Use a bot token to generate "Update dist" commit

This will permit workflows to run when this commit is applied.

- Avoid running ci-update-dist for modifications to dist directory (no recursion)
- Run full-suite only in response to bot updates.
This commit is contained in:
daz 2024-04-11 22:00:54 -06:00 committed by Daz DeBoer
parent 0627979b9c
commit ebf9707dff
2 changed files with 7 additions and 3 deletions

View File

@ -31,8 +31,8 @@ jobs:
exit 0 exit 0
fi fi
# Run full suite for push trigger on 'main' and 'release/*' branches # Run full suite for push trigger with "[bot] Update dist directory" commit message
if [[ "${{ github.ref_name }}" == "main" || "${{ github.ref_name }}" == "release/"* ]]; then if [ "${{ github.event.head_commit.message }}" == "[bot] Update dist directory" ]; then
echo "Push to main branch: suite=full" echo "Push to main branch: suite=full"
echo "suite=full" >> "$GITHUB_OUTPUT" echo "suite=full" >> "$GITHUB_OUTPUT"
exit 0 exit 0

View File

@ -6,6 +6,8 @@ on:
branches: branches:
- 'main' - 'main'
- 'release/**' - 'release/**'
paths_ignore:
- 'dist/**'
permissions: permissions:
contents: write contents: write
@ -16,6 +18,8 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with:
token: ${{ secrets.BOT_GITHUB_TOKEN }}
- name: Set up Node.js - name: Set up Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v4
@ -44,5 +48,5 @@ jobs:
if: github.repository == 'gradle/actions' if: github.repository == 'gradle/actions'
uses: stefanzweifel/git-auto-commit-action@v5 uses: stefanzweifel/git-auto-commit-action@v5
with: with:
commit_message: 'Update dist directory' commit_message: '[bot] Update dist directory'
file_pattern: dist file_pattern: dist