Skip to content

Commit

Permalink
move to same job again
Browse files Browse the repository at this point in the history
  • Loading branch information
lassemand committed Dec 17, 2024
1 parent b88d920 commit 3bd9dbe
Showing 1 changed file with 10 additions and 17 deletions.
27 changes: 10 additions & 17 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,21 +126,6 @@ jobs:
exit 1
fi
done
authenticate-github:
runs-on: ubuntu-latest
environment: release
needs: [build-static-binaries] # Has a TTL of 1h only
outputs:
access_token: ${{ steps.app-token.outputs.token }}
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: |
concordium-infra-images
build-static-binaries:
needs: [validate-preconditions]
Expand Down Expand Up @@ -635,13 +620,21 @@ jobs:
environment=${{ matrix.node.env }}
notify-immutable-infrastructure:
runs-on: ubuntu-latest
needs: [ node-linux, validate-preconditions, authenticate-github ]
needs: [ node-linux, validate-preconditions ]
if: contains(fromJSON('["rc", "alpha"]'), needs.validate-preconditions.outputs.release_type)
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: |
concordium-infra-images
- name: Invoke immutable node release flow
run: |
curl -X POST --fail \
-H "Authorization: Bearer ${{ needs.authenticate-github.outputs.access_token }}" \
-H "Authorization: Bearer ${{ steps.app-token.outputs.token }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/Concordium/concordium-infra-images/actions/workflows/release-node-images.yaml/dispatches \
-d '{"ref":"main", "inputs":{"node_version": "${{ needs.validate-preconditions.outputs.version }}", "release_type": "${{ needs.validate-preconditions.outputs.release_type }}"}}'

0 comments on commit 3bd9dbe

Please sign in to comment.