Port skipping final snapshot #31
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Snapshot | |
on: | |
push: | |
branches: | |
- "snapshot-*" | |
workflow_dispatch: {} | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
publish: | |
name: publish | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Get kubectl version | |
run: | | |
source hack/lib/kubectl-version.sh | |
echo "Using kubectl ${KUBECTL_VERSION}" | |
echo "KUBECTL_VERSION=$KUBECTL_VERSION" >> $GITHUB_ENV | |
- uses: azure/setup-kubectl@v4 | |
with: | |
version: "${{ env.KUBECTL_VERSION }}" | |
id: install | |
- name: Get AWS credentials | |
uses: aws-actions/[email protected] | |
with: | |
role-to-assume: ${{ secrets.AWS_ROLE_ARN }} | |
role-duration-seconds: 900 | |
aws-region: ${{ secrets.AWS_REGION }} | |
role-session-name: GithubActionsSession-publish | |
- name: Extract branch name | |
shell: bash | |
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | |
id: extract_branch | |
- name: Run publish | |
env: | |
SNAPSHOT_BUCKET: "${{ secrets.SNAPSHOT_BUCKET }}" | |
SNAPSHOT_CLOUDFRONT: "${{ secrets.SNAPSHOT_CLOUDFRONT }}" | |
BRANCH: ${{ steps.extract_branch.outputs.branch }} | |
run: | | |
bash hack/publish-snapshot.sh |