Skip to content

Commit

Permalink
fix(CI/Build): Use alchemy bot PAT to checkout code
Browse files Browse the repository at this point in the history
This will make sure we trigger a workflow run after
we pushed the changes.

See https://github.com/orgs/community/discussions/26220#discussioncomment-3250854
  • Loading branch information
tvdeyen committed Feb 16, 2024
1 parent a4116c2 commit 3093058
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
persist-credentials: false
- name: Setup Node
uses: actions/setup-node@v3
with:
Expand All @@ -52,12 +53,16 @@ jobs:
- name: Check git status
id: git-status
run: git diff --quiet || echo "changed=true" >> $GITHUB_OUTPUT
- name: git push
- name: git commit
if: steps.git-status.outputs.changed == 'true'
run: |
git config --local user.name 'AlchemyCMS - CI Bot'
git config --local user.email 'alchemy@blish.cloud'
git remote set-url origin https://x-access-token:${{ secrets.ALCHEMY_CI_BOT_ACCESS_TOKEN }}@github.com/$GITHUB_REPOSITORY
git add vendor/javascript
git commit -m "Update JS packages" -m "Rebuilt packages due to updated dependencies."
git push origin HEAD:${{ github.event.pull_request.head.ref }}
- name: Push changes
if: steps.git-status.outputs.changed == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.ALCHEMY_CI_BOT_ACCESS_TOKEN }}
branch: ${{ github.ref }}

0 comments on commit 3093058

Please sign in to comment.