Skip to content

Commit

Permalink
fix: handle default values for schedule runs
Browse files Browse the repository at this point in the history
  • Loading branch information
dlachaume committed Nov 4, 2024
1 parent 0efa5c1 commit 9316f6a
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/nightly-backward-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,26 @@ on:
default: "10.1.1"

jobs:
prepare-env-variables:
runs-on: ubuntu-22.04
outputs:
total_releases: ${{ steps.set-env.outputs.total_releases }}
cardano_node_version: ${{ steps.set-env.outputs.cardano_node_version }}
steps:
- name: Prepare env variables
id: set-env
run: |
if [[ "${{ github.event_name }}" == "schedule" ]]; then
echo "total_releases=3" >> $GITHUB_OUTPUT
echo 'cardano_node_version=["10.1.1"]' >> $GITHUB_OUTPUT
else
echo "total_releases=${{ inputs.total-releases }}" >> $GITHUB_OUTPUT
echo "cardano_node_version=[\"${{ inputs.cardano-node-version }}\"]" >> $GITHUB_OUTPUT
fi
prepare-binaries:
runs-on: ubuntu-22.04
needs: [prepare-env-variables]
outputs:
tags: ${{ steps.tags-test-lab.outputs.tags }}
steps:
Expand All @@ -30,7 +48,7 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./.github/workflows/scripts/download-distribution-binaries.sh ${{ inputs.total-releases }}
./.github/workflows/scripts/download-distribution-binaries.sh ${{ needs.prepare-env-variables.outputs.total_releases }}
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@master
Expand All @@ -57,13 +75,13 @@ jobs:
e2e:
runs-on: ubuntu-22.04
needs: [prepare-binaries]
needs: [prepare-env-variables, prepare-binaries]
strategy:
fail-fast: false
matrix:
tag: ${{ fromJSON(needs.prepare-binaries.outputs.tags) }}
node: [mithril-aggregator, mithril-client, mithril-signer]
cardano_node_version: ${{ fromJSON(inputs.cardano-node-version) }}
cardano_node_version: ${{ fromJSON(needs.prepare-env-variables.outputs.cardano_node_version) }}
run_id: ["#1"]

steps:
Expand Down

0 comments on commit 9316f6a

Please sign in to comment.