From e0cb2ae49c5e7e8c031aec2867ddad33f2946a55 Mon Sep 17 00:00:00 2001 From: Mic Neale Date: Tue, 26 Mar 2024 16:32:47 +1100 Subject: [PATCH] try gh command and use env var --- .github/workflows/autofmt.yml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/autofmt.yml b/.github/workflows/autofmt.yml index c0e5c8453b..6343996c9b 100644 --- a/.github/workflows/autofmt.yml +++ b/.github/workflows/autofmt.yml @@ -35,13 +35,9 @@ jobs: 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: | - await github.rest.actions.createWorkflowDispatch({ - owner: context.repo.owner, - repo: context.repo.repo, - workflow_id: 'ci.yml', - ref: '${{ github.head_ref }}' - }); \ No newline at end of file + env: + HEAD_REF: ${{ github.head_ref }} + GITHUB_TOKEN: ${{ secrets.FTL_AUTOFMT_TOKEN }} + run: | + gh workflow run ci.yml --ref $HEAD_REF + \ No newline at end of file