Skip to content

Commit

Permalink
tweak how autofmt is run
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelneale committed Mar 26, 2024
1 parent b7eddbc commit 04e006d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/autofmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,15 @@ jobs:
git remote set-url origin https://x-access-token:${{ secrets.FTL_AUTOFMT_TOKEN }}@github.com/${{ github.repository }}
git commit -am "chore(autofmt): Automated formatting"
git push
- name: Trigger CI
if: steps.git-check.outputs.modified == 'true'
uses: actions/github-script@v6
with:
github-token: ${{ secrets.FTL_AUTOFMT_TOKEN }}
script: |

Check failure on line 41 in .github/workflows/autofmt.yml

View workflow job for this annotation

GitHub Actions / Lint

"github.head_ref" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions for more details [expression]
await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'ci.yml',
ref: '${{ github.head_ref }}'
});
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
branches:
- main
pull_request:
workflow_dispatch:
name: CI
concurrency:
group: ${{ github.ref }}-ci
Expand Down

0 comments on commit 04e006d

Please sign in to comment.