Skip to content

Commit

Permalink
Check if *-MAlonzo branch exists on each run (#609)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucsanszky authored Nov 19, 2024
1 parent f93035b commit bccb83b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,18 @@ jobs:
MAlonzo:
runs-on: ubuntu-latest
steps:
- name: Check if ${{ env.MAlonzo_branch }} exists
uses: actions/checkout@v4
with:
ref: ${{ env.MAlonzo_branch }}
id: MAlonzo-exists
continue-on-error: true
if: github.ref != 'refs/heads/master'
- uses: actions/checkout@v4
with:
ref: MAlonzo-code
- name: Create branch ${{ env.MAlonzo_branch }} for generated code
if: github.event_name == 'pull_request' && github.event.action == 'opened'
if: github.ref != 'refs/heads/master' && steps.MAlonzo-exists.outcome == 'failure'
run: |
git checkout -b ${{ env.MAlonzo_branch }} origin/MAlonzo-code
git push origin ${{ env.MAlonzo_branch }}
Expand Down

0 comments on commit bccb83b

Please sign in to comment.