version bump v1.8.0 #541
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: Staging Containers | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- 'v*' | |
# Each container image is built in its own job. To add an image, simply copy and paste | |
# one of the jobs and configure the build to point to the container's Dockerfile and | |
# tags. If the build is main or for a tag then the images are pushed to dockerhub and | |
# gcr; images are not pushed on pull requests. | |
jobs: | |
# GDS Staging User UI: vaspdirectory.dev | |
gds-staging-user-ui: | |
name: GDS Staging UI | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Set Environment | |
id: vars | |
run: | | |
echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | |
echo "revision=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- name: Docker Metadata | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
# list of Docker images to use as basenames for tags | |
# this should be configured for each container built | |
images: | | |
trisa/gds-staging-user-ui | |
gcr.io/trisa-gds/gds-staging-user-ui | |
tags: | | |
type=semver,pattern={{raw}} | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=sha,prefix=,suffix=,format=short | |
- name: Setup QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Setup Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to DockerHub | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} | |
- name: Login to GCR | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@v3 | |
with: | |
registry: gcr.io | |
username: _json_key | |
password: ${{ secrets.GCR_SERVICE_ACCOUNT }} | |
- name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@v5 | |
with: | |
# context and Dockerfile - should be configured for each image | |
# note: the build args cannot include REACT_APP_AUTH0_SCOPE without breaking; | |
# this may be related to the format of the build-args text string because the | |
# scope requires spaces and "openid profile email" may not be parsed correctly | |
context: . | |
file: ./containers/gds-user-ui/Dockerfile | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
build-args: | | |
REACT_APP_TRISA_BASE_URL=https://bff.vaspdirectory.dev/v1/ | |
REACT_APP_ANALYTICS_ID=${{ secrets.REACT_APP_STAGING_VASPDIRECTORY_ANALYTICS_ID }} | |
REACT_APP_VERSION_NUMBER=${{ steps.vars.outputs.tag }} | |
REACT_APP_GIT_REVISION=${{ steps.vars.outputs.revision }} | |
REACT_APP_AUTH0_DOMAIN=${{ secrets.REACT_APP_STAGING_AUTH0_DOMAIN }} | |
REACT_APP_AUTH0_CLIENT_ID=${{ secrets.REACT_APP_STAGING_AUTH0_CLIENT_ID }} | |
REACT_APP_AUTH0_REDIRECT_URI=https://vaspdirectory.dev/auth/callback | |
REACT_APP_AUTH0_AUDIENCE=https://bff.vaspdirectory.dev | |
REACT_APP_SENTRY_DSN=${{ secrets.REACT_APP_SENTRY_DSN }} | |
REACT_APP_SENTRY_ENVIRONMENT=staging | |
REACT_APP_USE_DASH_LOCALE=true | |
- name: Slack Notify Staging UI Build Success | |
if: success() | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }} | |
uses: voxmedia/[email protected] | |
with: | |
channel: gds-containers | |
status: SUCCESS | |
color: good | |
- name: Slack Notify Staging UI Build Fail | |
if: failure() | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }} | |
uses: voxmedia/[email protected] | |
with: | |
channel: gds-containers | |
status: FAILED | |
color: danger | |
# GDS Staging Admin UI: admin.vaspdirectory.dev | |
gds-staging-admin-ui: | |
name: GDS Staging Admin UI | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Set Environment | |
id: vars | |
run: | | |
echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | |
echo "revision=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- name: Docker Metadata | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
# list of Docker images to use as basenames for tags | |
# this should be configured for each container built | |
images: | | |
trisa/gds-staging-admin-ui | |
gcr.io/trisa-gds/gds-staging-admin-ui | |
tags: | | |
type=semver,pattern={{raw}} | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=sha,prefix=,suffix=,format=short | |
- name: Setup QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Setup Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to DockerHub | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} | |
- name: Login to GCR | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@v3 | |
with: | |
registry: gcr.io | |
username: _json_key | |
password: ${{ secrets.GCR_SERVICE_ACCOUNT }} | |
- name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@v5 | |
with: | |
# context and Dockerfile - should be configured for each image | |
context: . | |
file: ./containers/gds-admin-ui/Dockerfile | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
build-args: | | |
REACT_APP_VERSION_NUMBER=${{ steps.vars.outputs.tag }} | |
REACT_APP_GIT_REVISION=${{ steps.vars.outputs.revision }} | |
REACT_APP_GDS_API_ENDPOINT=https://api.admin.vaspdirectory.dev/v2 | |
REACT_APP_GDS_IS_TESTNET=false | |
REACT_APP_GOOGLE_CLIENT_ID=${{ secrets.REACT_APP_STAGING_VASPDIRECTORY_CLIENT_ID }} | |
REACT_APP_SENTRY_DSN=${{ secrets.REACT_APP_ADMIN_SENTRY_DSN }} | |
REACT_APP_SENTRY_ENVIRONMENT=staging | |
- name: Slack Notify Staging Admin UI Build Success | |
if: success() | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }} | |
uses: voxmedia/[email protected] | |
with: | |
channel: gds-containers | |
status: SUCCESS | |
color: good | |
- name: Slack Notify Staging Admin UI Build Fail | |
if: failure() | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }} | |
uses: voxmedia/[email protected] | |
with: | |
channel: gds-containers | |
status: FAILED | |
color: danger | |
# GDS Staging TestNet Admin UI: admin.trisatest.dev | |
gds-staging-testnet-admin-ui: | |
name: GDS Staging TestNet Admin UI | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Set Environment | |
id: vars | |
run: | | |
echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | |
echo "revision=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- name: Docker Metadata | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
# list of Docker images to use as basenames for tags | |
# this should be configured for each container built | |
images: | | |
trisa/gds-staging-testnet-admin-ui | |
gcr.io/trisa-gds/gds-staging-testnet-admin-ui | |
tags: | | |
type=semver,pattern={{raw}} | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=sha,prefix=,suffix=,format=short | |
- name: Setup QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Setup Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to DockerHub | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} | |
- name: Login to GCR | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@v3 | |
with: | |
registry: gcr.io | |
username: _json_key | |
password: ${{ secrets.GCR_SERVICE_ACCOUNT }} | |
- name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@v5 | |
with: | |
# context and Dockerfile - should be configured for each image | |
context: . | |
file: ./containers/gds-admin-ui/Dockerfile | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
build-args: | | |
REACT_APP_VERSION_NUMBER=${{ steps.vars.outputs.tag }} | |
REACT_APP_GIT_REVISION=${{ steps.vars.outputs.revision }} | |
REACT_APP_GDS_API_ENDPOINT=https://api.admin.trisatest.dev/v2 | |
REACT_APP_GDS_IS_TESTNET=true | |
REACT_APP_GOOGLE_CLIENT_ID=${{ secrets.REACT_APP_STAGING_TRISATEST_CLIENT_ID }} | |
REACT_APP_SENTRY_DSN=${{ secrets.REACT_APP_ADMIN_SENTRY_DSN }} | |
REACT_APP_SENTRY_ENVIRONMENT=staging | |
- name: Slack Notify Staging TestNet UI Build Success | |
if: success() | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }} | |
uses: voxmedia/[email protected] | |
with: | |
channel: gds-containers | |
status: SUCCESS | |
color: good | |
- name: Slack Notify Staging TestNet UI Build Fail | |
if: failure() | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }} | |
uses: voxmedia/[email protected] | |
with: | |
channel: gds-containers | |
status: FAILED | |
color: danger |