diff --git a/.github/workflows/bump-aztec-packages-commit.yml b/.github/workflows/bump-aztec-packages-commit.yml new file mode 100644 index 00000000000..6b7c1a80a0d --- /dev/null +++ b/.github/workflows/bump-aztec-packages-commit.yml @@ -0,0 +1,50 @@ +name: Bump external repos pinned commits + +on: + workflow_dispatch: + schedule: + # Trigger at 8am on Mondays + - cron: '0 8 * * 1' + + +jobs: + bump-commit: + name: Update external repo pinned commits + runs-on: ubuntu-22.04 + steps: + - name: Checkout repo + uses: actions/checkout@v4 + with: + ref: master + + - name: Check for existing PR + id: pr-check + run: | + set -xue # print commands + PR_URL=$(gh pr list --repo noir-lang/noir --head bump-aztec-packages --json url --jq ".[0].url") + echo "pr_url=$PR_URL" >> $GITHUB_OUTPUT + env: + GH_TOKEN: ${{ github.token }} + + - name: Configure git + run: | + git config user.name noirwhal + git config user.email tomfrench@aztecprotocol.com + + - name: Update commit + run: | + git checkout bump-aztec-packages || git checkout -b bump-aztec-packages + ./scripts/bump-aztec-packages-commit.sh + git add . + git commit -m 'chore: Update pinned commit of aztec-packages' + git push --set-upstream origin bump-aztec-packages --force + + - name: Create PR + if: ${{ steps.pr-check.outputs.pr_url == '' }} + run: | + PR_BODY=""" + Automated update of the pinned commit of [aztec-packages](https://github.com/AztecProtocol/aztec-packages) repository against which we run benchmarks. + """ + gh pr create --repo noir-lang/noir --title "chore: bump external pinned commits" --body "$PR_BODY" --base master --head bump-aztec-packages + env: + GH_TOKEN: ${{ secrets.NOIR_REPO_TOKEN }} diff --git a/scripts/bump-aztec-packges-commit.sh b/scripts/bump-aztec-packages-commit.sh similarity index 100% rename from scripts/bump-aztec-packges-commit.sh rename to scripts/bump-aztec-packages-commit.sh