File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 pull_request :
55 branches :
66 - master
7- - main
87 types :
98 - opened
109 - synchronize
1110 - reopened
1211 paths :
13- - " _articles/** /*.md"
12+ - " _articles/faq /*.md"
1413
1514permissions :
1615 contents : write
1716
1817jobs :
19- update-on-main -pr :
18+ update-on-master -pr :
2019 if : github.actor != 'github-actions[bot]' && github.event.pull_request.head.repo.full_name == github.repository
2120 runs-on : ubuntu-latest
2221 steps :
3534 git fetch origin "${{ github.event.pull_request.base.ref }}"
3635
3736 git diff --name-only "origin/${{ github.event.pull_request.base.ref }}"...HEAD \
38- | grep -E '^_articles/. +\.md$' \
37+ | grep -E '^_articles/faq/[^/] +\.md$' \
3938 | sort -u > changed_files.txt || true
4039
4140 count="$(wc -l < changed_files.txt | tr -d ' ')"
8382
8483 git config user.name "github-actions[bot]"
8584 git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
86- git add _articles
85+ while IFS= read -r file; do
86+ [[ -f "$file" ]] || continue
87+ git add "$file"
88+ done < changed_files.txt
8789 git commit -m "chore: update last_modified timestamps"
8890 git push origin HEAD:${{ github.event.pull_request.head.ref }}
You can’t perform that action at this time.
0 commit comments