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 94a64d0
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,29 @@ 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 }}
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
substituters = https://cache.iog.io https://cache.nixos.org/
- name: Commit generated code at ${{ env.MAlonzo_branch }}
uses: actions/checkout@v4
if: github.ref != 'refs/heads/master'
run: |
nix-build -A ledger.hsSrc -j1 -o outputs/MAlonzo
Expand Down

0 comments on commit 94a64d0

Please sign in to comment.