Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(monorepo): bb mirror action and .gitrepo file #1153

Merged
merged 2 commits into from
Jul 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/mirror_barretenberg_repository.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Mirror to barretenberg repo

on:
push:
branches:
- master
paths:
- 'circuits/cpp/barretenberg/**'
- '!circuits/cpp/barretenberg/.gitrepo'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}

- name: Push to branch
run: |
# we push using git subrepo (https://github.com/ingydotnet/git-subrepo)
# with some logic to recover from squashed parent commits
SUBREPO_PATH=circuits/cpp/barretenberg
# identify ourselves, needed to commit
git config --global user.name AztecBot
git config --global user.email [email protected]
# push to subrepo, commit to master. The commit is needed
# to continue to replay. If we still hit issues such as this
# action failing due to upstream changes, a manual resolution
# PR with ./scripts/git_subrepo.sh pull will be needed.
./scripts/git_subrepo.sh push $SUBREPO_PATH --branch=main
git push # update .gitrepo on master