Skip to content

Continuous Deploy solution #1272

Continuous Deploy solution

Continuous Deploy solution #1272

Workflow file for this run

name: Continuous Deploy solution
on:
release:
types: [published]
workflow_dispatch:
permissions:
id-token: write
contents: write
issues: write
env:
CI: 1
FORCE_COLOR: 3
jobs:
deploy:
runs-on: ubuntu-24.04
timeout-minutes: 10
environment:
name: production
url: ${{ steps.endpoint.outputs.url }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set version
run:
echo "VERSION=`git describe --tags HEAD | tr -d '\n'`" >> $GITHUB_ENV
- uses: actions/setup-node@v4
with:
node-version: "22.x"
cache: "npm"
- name: Install dependencies
run: npm ci --no-audit
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE }}
role-session-name: github-action-public-parameter-registry-cd
aws-region: ${{ vars.AWS_REGION }}
- name: Set stack name
if: vars.STACK_NAME != ''
run: echo "STACK_NAME=${{ vars.STACK_NAME }}" >> $GITHUB_ENV
- name: Deploy solution stack
run: npx cdk deploy --require-approval never
- name: Get endpoint URL
id: endpoint
run: |
ENDPOINT=`aws cloudformation describe-stacks --stack-name ${STACK_NAME:-public-parameter-registry} | jq -r '.Stacks[0].Outputs[] | select(.OutputKey == "registryEndpoint") | .OutputValue' | sed -E 's/\/$//g'`
echo "url=${ENDPOINT}" >> $GITHUB_OUTPUT