v2.3.0 #7
Workflow file for this run
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
on: | |
release: | |
types: [published] | |
name: Deploy release to prod | |
jobs: | |
deploy-to-prod-env: | |
runs-on: [ARM64, self-hosted, Linux] | |
environment: production | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Assume happy-api deployment role | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
aws-region: us-west-2 | |
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} | |
role-duration-seconds: 1200 | |
role-session-name: CzidGraphQLFederationUpdateProd | |
- name: Install happy | |
uses: chanzuckerberg/github-actions/.github/actions/install-happy@main | |
- name: Get Id Token | |
uses: actions/github-script@v6 | |
id: idtoken | |
with: | |
script: | | |
const id_token = await core.getIDToken() | |
core.setOutput('id_token', id_token) | |
core.exportVariable('id_token', id_token); | |
- name: Set version info | |
run: | | |
HAPPY_OIDC_ID_TOKEN=${{env.id_token}} happy config set CZID_GQL_FED_GIT_SHA ${{ github.sha }} --env prod --aws-profile "" | |
HAPPY_OIDC_ID_TOKEN=${{env.id_token}} happy config set CZID_GQL_FED_GIT_VERSION ${{ github.event.release.tag_name }} --env prod --aws-profile "" | |
- name: Set CZ ID Rails API URL | |
run: | | |
HAPPY_OIDC_ID_TOKEN=${{env.id_token}} happy config set API_URL ${{ vars.API_URL }} --env prod --aws-profile "" | |
- name: Deploy to production env | |
uses: chanzuckerberg/github-actions/.github/actions/[email protected] | |
with: | |
tfe-token: ${{ secrets.TFE_TOKEN }} | |
env: ${{ vars.HAPPY_ENV }} | |
image-source-env: ${{ vars.IMAGE_SOURCE_ENV }} | |
image-source-stack: ${{ secrets.IMAGE_SOURCE_STACK }} | |
image-source-role-arn: ${{ secrets.IMAGE_SOURCE_ROLE_ARN }} | |
stack-name: ${{ secrets.HAPPY_STACK_NAME }} | |
version-lock-file: .happy/version.lock |