Skip to content

Commit b28afdb

Browse files
authored
Update main.yml
1 parent 587530e commit b28afdb

1 file changed

Lines changed: 6 additions & 11 deletions

File tree

.github/workflows/main.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,13 @@ jobs:
2020
run: |
2121
wget --no-cache -O "Pagetual/items_all.json" http://wedata.net/databases/AutoPagerize/items_all.json
2222
23-
#- uses: technote-space/get-diff-action@v6
24-
# with:
25-
# FILES: Pagetual/items_all.json
26-
- name: Get changed files
27-
id: changes
28-
# Set outputs using the command.
29-
run: |
30-
echo "::set-output name=all::$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | xargs)"
23+
- uses: technote-space/get-diff-action@v6
24+
with:
25+
FILES: items_all.json
26+
SET_ENV_NAME: GIT_DIFF_FILES
3127

3228
- name: Commit
33-
#if: env.GIT_DIFF
34-
if: ${{changes.outputs.all}}
29+
if: env.GIT_DIFF
3530
run: |
3631
git config user.name "github-actions[bot]"
3732
git config user.email "512946+github-actions[bot]@users.noreply.github.com"
@@ -40,7 +35,7 @@ jobs:
4035
git commit -m "auto commit from github actions"
4136
4237
- name: Push
43-
if: ${{changes.outputs.all}}
38+
if: env.GIT_DIFF
4439
uses: ad-m/github-push-action@master
4540
with:
4641
github_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)