From 593e55c0dc5228dab0cfdb5c5217aec1beb32013 Mon Sep 17 00:00:00 2001 From: Alexander Aksenov Date: Fri, 12 Aug 2022 12:29:35 +0000 Subject: [PATCH] Prepare execution matrix as pre-requisite. --- --- a/.github/workflows/forkless-update-nodata.yml +++ b/.github/workflows/forkless-update-nodata.yml @@ -20,7 +20,41 @@ # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: + + prepare-execution-marix: + + name: Prepare execution matrix + + runs-on: self-hosted-ci + outputs: + matrix: ${{ steps.create_matrix.outputs.matrix }} + steps: + + - name: Clean Workspace + uses: AutoModality/action-clean@v1.1.0 + + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v3 + with: + ref: ${{ github.head_ref }} #Checking out head commit + + - name: Read .env file + uses: xom9ikk/dotenv@v1.0.2 + + - name: Create Execution matrix + uses: fabiocaccamo/create-matrix-action@v2 + id: create_matrix + uses: ./ + with: + matrix: | + network {Opal}, runtime {opal}, feature {opal-runtime}, mainnet_branch {${{ env.QUARTZ_MAINNET_TAG }}} + network {Quartz}, runtime {quartz}, feature {quartz-runtime}, mainnet_branch {${{ env.QUARTZ_MAINNET_TAG }}} + network {Unique}, runtime {unique}, feature {unique-runtime}, mainnet_branch {${{ env.UNIQUE_MAINNET_TAG }}} + + + forkless-update-nodata: + needs: prepare-execution-marix # The type of runner that the job will run on runs-on: self-hosted-ci @@ -30,22 +64,23 @@ strategy: matrix: - include: - - network: "Opal" - features: "opal-runtime" - runtime: "opal" - mainnet_branch: v924010 - mainnet_tag: v924010 - - network: "Quartz" # KUSAMA_MAINNET_BRANCH для quartz-runtime - features: "quartz-runtime" - runtime: "quartz" - mainnet_branch: quartz-v924012-2 - mainnet_tag: v924012 - - network: "Unique" # POLKADOT_MAINNET_BRANCH для unique-runtime - features: "unique-runtime" - runtime: "unique" - mainnet_branch: v924010 - mainnet_tag: v924010 + include: ${{fromJson(needs.prepare-execution-marix.outputs.matrix)}} +# include: +# - network: "Opal" +# features: "opal-runtime" +# runtime: "opal" +# mainnet_branch: v924010 +# mainnet_tag: v924010 +# - network: "Quartz" # KUSAMA_MAINNET_BRANCH для quartz-runtime +# features: "quartz-runtime" +# runtime: "quartz" +# mainnet_branch: quartz-v924012-2 +# mainnet_tag: v924012 +# - network: "Unique" # POLKADOT_MAINNET_BRANCH для unique-runtime +# features: "unique-runtime" +# runtime: "unique" +# mainnet_branch: v924010 +# mainnet_tag: v924010 -- gitstuff