Bump external repos pinned commits #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 [email protected] | |
- 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 }} |