Skip to content

v2.34.4

v2.34.4 #122

Workflow file for this run

on:
release:
types: [published]
workflow_dispatch:
inputs:
release_tag:
description: "Release tag version to deploy to staging (defaults to latest)"
required: false
type: string
name: Deploy release to staging
jobs:
get-release-tag:
runs-on: [ARM64, self-hosted, Linux]
environment: staging
outputs:
release_tag: ${{ steps.get-release.outputs.release_tag}}
steps:
- name: Get latest or specified release
uses: chanzuckerberg/czid-graphql-federation-server/.github/actions/get-release-tag@main
id: get-release
with:
requested_release_tag: ${{ github.event.inputs.release_tag || '' }}
deploy-to-staging-env:
needs: get-release-tag
if: needs.get-release-tag.outputs.release_tag != ''
runs-on: [ARM64, self-hosted, Linux]
environment: staging
permissions:
id-token: write
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: "${{ needs.get-release-tag.outputs.release_tag }}"
- name: Assume happy-api deployment role
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-west-2
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
role-duration-seconds: 1200
role-session-name: CzidGraphQLFederationUpdateStaging
- name: Install happy
uses: chanzuckerberg/github-actions/.github/actions/install-happy@main
- name: Set git SHA
uses: chanzuckerberg/czid-graphql-federation-server/.github/actions/happy-config-set@main
with:
app_config_name: CZID_GQL_FED_GIT_SHA
app_config_value: ${{ github.sha }}
happy_env: staging
- name: Set release version
uses: chanzuckerberg/czid-graphql-federation-server/.github/actions/happy-config-set@main
with:
app_config_name: CZID_GQL_FED_GIT_VERSION
app_config_value: ${{ needs.get-release-tag.outputs.release_tag || ''}}
happy_env: staging
- name: Set CZ ID Rails API URL
uses: chanzuckerberg/czid-graphql-federation-server/.github/actions/happy-config-set@main
with:
app_config_name: API_URL
app_config_value: ${{ vars.API_URL}}
happy_env: staging
- name: Set CZ ID Entities URL
uses: chanzuckerberg/czid-graphql-federation-server/.github/actions/happy-config-set@main
with:
app_config_name: NEXTGEN_ENTITIES_URL
app_config_value: ${{ vars.NEXTGEN_ENTITIES_URL}}
happy_env: staging
- name: Set CZ ID Workflows URL
uses: chanzuckerberg/czid-graphql-federation-server/.github/actions/happy-config-set@main
with:
app_config_name: NEXTGEN_WORKFLOWS_URL
app_config_value: ${{ vars.NEXTGEN_WORKFLOWS_URL}}
happy_env: staging
- name: Set allowed CORS origins
uses: chanzuckerberg/czid-graphql-federation-server/.github/actions/happy-config-set@main
with:
app_config_name: ALLOWED_CORS_ORIGINS
app_config_value: ${{ vars.ALLOWED_CORS_ORIGINS}}
happy_env: staging
- name: Deploy to staging env
uses: chanzuckerberg/github-actions/.github/actions/[email protected]
with:
tfe-token: ${{ secrets.TFE_TOKEN }}
env: ${{ vars.HAPPY_ENV }}
github-repo-branch: ${{ needs.get-release-tag.outputs.release_tag }}
create-tag: true
stack-name: ${{ secrets.HAPPY_STACK_NAME }}
version-lock-file: .happy/version.lock