Skip to content

Sc 23170

Sc 23170 #4073

Workflow file for this run

name: Containers
on:
push:
branches:
- main
- develop
- 'release-v*'
tags:
- 'v*'
pull_request:
branches:
- develop
jobs:
beacon:
name: Beacon UI
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup 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@v4
with:
# list of Docker images to use as basenames for tags
# this should be configured for each container built
images: |
rotationalio/beacon
gcr.io/rotationalio-habanero/beacon
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@v2
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
- name: Login to GCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: gcr.io
username: _json_key
password: ${{ secrets.GCR_SERVICE_ACCOUNT }}
- name: Build and Push
id: docker_build
uses: docker/build-push-action@v4
with:
context: .
file: ./containers/beacon/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
REACT_APP_TENANT_BASE_URL=https://api.rotational.app/v1/
REACT_APP_QUARTERDECK_BASE_URL=https://auth.rotational.app/v1/
REACT_APP_ANALYTICS_ID=${{ secrets.REACT_APP_ANALYTICS_ID }}
REACT_APP_VERSION_NUMBER=${{ steps.vars.outputs.tag }}
REACT_APP_GIT_REVISION=${{ steps.vars.outputs.revision }}
REACT_APP_SENTRY_DSN=${{ secrets.REACT_APP_SENTRY_DSN }}
REACT_APP_SENTRY_ENVIRONMENT=production
REACT_APP_USE_DASH_LOCALE=false
- name: Sentry Release
if: startsWith(github.ref, 'refs/tags/v')
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: beacon
with:
environment: production
version: ${{ steps.vars.outputs.tag }}
beacon-staging:
name: Beacon Staging UI
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup 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@v4
with:
# list of Docker images to use as basenames for tags
# this should be configured for each container built
images: |
rotationalio/beacon-staging
gcr.io/rotationalio-habanero/beacon-staging
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@v2
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
- name: Login to GCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: gcr.io
username: _json_key
password: ${{ secrets.GCR_SERVICE_ACCOUNT }}
- name: Build and Push
id: docker_build
uses: docker/build-push-action@v4
with:
context: .
file: ./containers/beacon/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
REACT_APP_TENANT_BASE_URL=https://api.ensign.world/v1/
REACT_APP_QUARTERDECK_BASE_URL=https://auth.ensign.world/v1/
REACT_APP_ANALYTICS_ID=${{ secrets.REACT_APP_STAGING_ANALYTICS_ID }}
REACT_APP_VERSION_NUMBER=${{ steps.vars.outputs.tag }}
REACT_APP_GIT_REVISION=${{ steps.vars.outputs.revision }}
REACT_APP_SENTRY_DSN=${{ secrets.REACT_APP_SENTRY_DSN }}
REACT_APP_SENTRY_ENVIRONMENT=staging
REACT_APP_USE_DASH_LOCALE=false
ensign:
name: Ensign
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup 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@v4
with:
# list of Docker images to use as basenames for tags
# this should be configured for each container built
images: |
rotationalio/ensign
gcr.io/rotationalio-habanero/ensign
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@v2
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
- name: Login to GCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: gcr.io
username: _json_key
password: ${{ secrets.GCR_SERVICE_ACCOUNT }}
- name: Build and Push
id: docker_build
uses: docker/build-push-action@v4
with:
context: .
file: ./containers/ensign/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
GIT_REVISION=${{ steps.vars.outputs.revision }}
- name: Sentry Release
if: startsWith(github.ref, 'refs/tags/v')
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ensign
with:
environment: production
version: ${{ steps.vars.outputs.tag }}
tenant:
name: Tenant
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup 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@v4
with:
# list of Docker images to use as basenames for tags
# this should be configured for each container built
images: |
rotationalio/tenant
gcr.io/rotationalio-habanero/tenant
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@v2
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
- name: Login to GCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: gcr.io
username: _json_key
password: ${{ secrets.GCR_SERVICE_ACCOUNT }}
- name: Build and Push
id: docker_build
uses: docker/build-push-action@v4
with:
context: .
file: ./containers/tenant/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
GIT_REVISION=${{ steps.vars.outputs.revision }}
- name: Sentry Release
if: startsWith(github.ref, 'refs/tags/v')
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: tenant
with:
environment: production
version: ${{ steps.vars.outputs.tag }}
quarterdeck:
name: Quarterdeck
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup 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@v4
with:
# list of Docker images to use as basenames for tags
# this should be configured for each container built
images: |
rotationalio/quarterdeck
gcr.io/rotationalio-habanero/quarterdeck
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@v2
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
- name: Login to GCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: gcr.io
username: _json_key
password: ${{ secrets.GCR_SERVICE_ACCOUNT }}
- name: Build and Push
id: docker_build
uses: docker/build-push-action@v4
with:
context: .
file: ./containers/quarterdeck/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
GIT_REVISION=${{ steps.vars.outputs.revision }}
- name: Sentry Release
if: startsWith(github.ref, 'refs/tags/v')
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: quarterdeck
with:
environment: production
version: ${{ steps.vars.outputs.tag }}
uptime:
name: Uptime
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup 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@v4
with:
# list of Docker images to use as basenames for tags
# this should be configured for each container built
images: |
rotationalio/uptime
gcr.io/rotationalio-habanero/uptime
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@v2
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
- name: Login to GCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: gcr.io
username: _json_key
password: ${{ secrets.GCR_SERVICE_ACCOUNT }}
- name: Build and Push
id: docker_build
uses: docker/build-push-action@v4
with:
context: .
file: ./containers/uptime/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
GIT_REVISION=${{ steps.vars.outputs.revision }}