Skip to content

Commit

Permalink
Check if *-MAlonzo branch exists on each run
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucsanszky committed Nov 15, 2024
1 parent aead33b commit c6b592c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .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:
- uses: actions/checkout@v4
- name: Check if ${{ env.MAlonzo_branch }} exists
uses: actions/checkout@v4
with:
ref: MAlonzo-code
ref: ${{ env.MAlonzo_branch }}
id: MAlonzo-exists
continue-on-error: true
if: github.ref != 'refs/heads/master'
- name: Create branch ${{ env.MAlonzo_branch }} for generated code
if: github.event_name == 'pull_request' && github.event.action == 'opened'
uses: actions/checkout@v4
with:
ref: MAlonzo-code
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 c6b592c

Please sign in to comment.