From 7f1673cb5b7a472368d1b44912fda72c8be31636 Mon Sep 17 00:00:00 2001 From: ludamad Date: Mon, 16 Sep 2024 08:01:07 -0400 Subject: [PATCH] chore(ci): fix redo-typo-pr.yml (#8555) OK that didn't work first pass for a few silly reasons, but I wanted a baseline in so I can test with workflow_dispatch (don't know how to do that to uncommitted flows) Also made it work on a PR label redo-typo-pr --- .github/workflows/redo-typo-pr.yml | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/.github/workflows/redo-typo-pr.yml b/.github/workflows/redo-typo-pr.yml index d29f0fe16c2..10fc9a75f61 100644 --- a/.github/workflows/redo-typo-pr.yml +++ b/.github/workflows/redo-typo-pr.yml @@ -8,6 +8,16 @@ on: required: true type: string + pull_request: + types: [labeled] + branches: + - master + paths-ignore: + - '**/README.md' + filters: + labels: + - 'redo-typo-pr' + jobs: redo-typo-pr: runs-on: ubuntu-latest @@ -15,15 +25,22 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v3 - - - name: Install GitHub CLI - run: | - sudo apt-get update - sudo apt-get install -y gh + with: + token: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }} - name: Authenticate with GitHub CLI run: | echo "${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}" | gh auth login --with-token + - name: Set git configure for commits + run: | + # Identify ourselves, needed to commit + git config --global user.name AztecBot + git config --global user.email tech@aztecprotocol.com + + - name: Determine PR number + id: determine-pr-number + run: echo "PR_NUMBER=${{ github.event.inputs.pr_number || github.event.pull_request.number }}" >> $GITHUB_ENV + - name: Run repo-typo-pr script - run: ./scripts/repo-typo-pr ${{ github.event.inputs.pr_number }} + run: ./scripts/redo-typo-pr ${{ env.PR_NUMBER }}