Skip to content

Commit

Permalink
Port updated workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
niallthomson authored Jul 1, 2024
1 parent 0b78f4c commit ee1af32
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/publish-snapshot.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
name: Publish Snapshot

on:
workflow_call: {}
workflow_dispatch:
inputs:
snapshot:
description: "The snapshot to publish"
required: true
type: string
push:
branches:
- "snapshot-*"
workflow_dispatch: {}

permissions:
id-token: write
Expand All @@ -20,8 +17,6 @@ jobs:
steps:
- name: Check out code
uses: actions/checkout@v4
with:
ref: snapshot-${{ inputs.snapshot }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
Expand All @@ -42,10 +37,14 @@ jobs:
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: snapshot-${{ inputs.snapshot }}
BRANCH: ${{ steps.extract_branch.outputs.branch }}
run: |
bash hack/publish-snapshot.sh

0 comments on commit ee1af32

Please sign in to comment.