diff --git a/.github/workflows/changesets.yml b/.github/workflows/changesets.yml index 0e341f5a8f..811f2b750c 100644 --- a/.github/workflows/changesets.yml +++ b/.github/workflows/changesets.yml @@ -9,12 +9,31 @@ concurrency: cancel-in-progress: true jobs: + get-tempo-testnet-tag: + name: Get Testnet Tempo Version + runs-on: ubuntu-latest + outputs: + tag: ${{ steps.fetch-tag.outputs.tag }} + steps: + - name: Fetch testnet Tempo SHA + id: fetch-tag + continue-on-error: true + run: | + SHA=$(curl -s https://rpc.testnet.tempo.xyz -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":1}' | \ + jq -r '.result // empty' | grep -oP 'v[\d.]+-\K[a-f0-9]+') || true + echo "tag=sha-${SHA:-latest}" >> $GITHUB_OUTPUT + verify: name: Verify + needs: get-tempo-testnet-tag uses: ./.github/workflows/verify.yml secrets: inherit permissions: contents: read + with: + tempo-tag: ${{ needs.get-tempo-testnet-tag.outputs.tag }} changesets: name: Create version pull request diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 9109e9345a..74868ba3ba 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -1,6 +1,10 @@ name: Verify on: workflow_call: + inputs: + tempo-tag: + type: string + required: false workflow_dispatch: jobs: @@ -133,7 +137,7 @@ jobs: VITE_NETWORK_TRANSPORT_MODE: ${{ matrix.transport-mode }} VITE_SHARD_ID: ${{ matrix.shard }} VITE_TEMPO_ENV: localnet - VITE_TEMPO_TAG: latest + VITE_TEMPO_TAG: ${{ inputs.tempo-tag || 'latest' }} - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v4