Skip to content

Commit f5aefe8

Browse files
committed
test: update push workflow
1 parent 56bffba commit f5aefe8

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

.github/workflows/pull_request.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ jobs:
5050
golint -set_exit_status=1 ./...
5151
release_check:
5252
runs-on: ubuntu-latest
53-
outputs:
54-
changes: ${{ steps.changes.outputs.changes}}
5553
steps:
5654
- name: Checkout repository
5755
uses: actions/checkout@v2

.github/workflows/push_main.yaml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,21 +72,27 @@ jobs:
7272
release_check:
7373
runs-on: ubuntu-latest
7474
needs: [test, lint]
75-
outputs:
76-
changes: ${{ steps.changes.outputs.changes}}
7775
steps:
7876
- name: Checkout repository
7977
uses: actions/checkout@v2
8078
with:
81-
fetch-depth: 2
82-
- name: Get changed files
83-
id: changes
79+
fetch-depth: 0
80+
- name: Check Diff
81+
uses: technote-space/get-diff-action@v6
82+
with:
83+
PATTERNS: |
84+
+**/*.go
85+
!**/*_test.go
86+
FILES: |
87+
go.mod
88+
- name: Output Diff
89+
if: env.GIT_DIFF
8490
run: |
85-
echo "::set-output name=changes::$(git diff --name-only --diff-filter=ACMRT origin/main origin/${GITHUB_HEAD_REF} | grep 'go.mod\|.go$' | grep -v _test.go$ | xargs)"
91+
echo ${{ env.GIT_DIFF }}
8692
release:
8793
runs-on: ubuntu-latest
8894
needs: [release_check]
89-
if: ${{needs.release_check.outputs.changes}}
95+
if: env.GIT_DIFF
9096
outputs:
9197
version: ${{ steps.release.outputs.version }}
9298
steps:

0 commit comments

Comments
 (0)