Publish Content #2
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 Content | |
on: | |
workflow_call: {} | |
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 | |
with: | |
ref: stable | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- 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: Run publish | |
env: | |
CONTENT_BUCKET: "${{ secrets.CONTENT_BUCKET }}" | |
CONTENT_CLOUDFRONT: "${{ secrets.CONTENT_CLOUDFRONT }}" | |
BRANCH: stable | |
run: | | |
bash hack/publish-content.sh |