fix server side validation error on scenario page closes #289 #169
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: Build and Push Image to GCR | |
on: | |
release: | |
types: [published] | |
push: | |
branches: [main] | |
jobs: | |
build-and-push: | |
strategy: | |
fail-fast: false | |
matrix: | |
image: [stormpiper-pod, bg_worker, redis, stormpiper-test] | |
runs-on: ubuntu-latest | |
env: | |
DOCKER_BUILDKIT: 1 | |
COMPOSE_DOCKER_CLI_BUILD: 1 | |
ARTIFACT_REGISTRY: gcr.io/tacoma-app | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Prepare tags | |
id: prep | |
run: | | |
DOCKER_IMAGE=$ARTIFACT_REGISTRY/${{ matrix.image }} | |
VERSION=edge | |
if [[ $GITHUB_REF == refs/tags/* ]]; then | |
VERSION=${GITHUB_REF#refs/tags/} | |
fi | |
TAGS="${DOCKER_IMAGE}:${VERSION}" | |
if [[ ${VERSION#v} =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then | |
TAGS="${TAGS},${DOCKER_IMAGE}:latest" | |
fi | |
echo "tags: ${TAGS}" | |
echo "tags=${TAGS}" >> $GITHUB_OUTPUT | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Inspect builder | |
run: | | |
echo "Name: ${{ steps.buildx.outputs.name }}" | |
echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}" | |
echo "Status: ${{ steps.buildx.outputs.status }}" | |
echo "Flags: ${{ steps.buildx.outputs.flags }}" | |
echo "Platforms: ${{ steps.buildx.outputs.platforms }}" | |
- 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_JSON_KEY }} | |
- name: Build and Push | |
id: docker_build | |
uses: docker/build-push-action@v3 | |
with: | |
builder: ${{ steps.buildx.outputs.name }} | |
context: . | |
target: ${{ matrix.image }} | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.prep.outputs.tags }} | |
cache-from: type=registry,ref=${{ env.ARTIFACT_REGISTRY }}/${{ matrix.image }}:buildcache | |
cache-to: type=registry,ref=${{ env.ARTIFACT_REGISTRY }}/${{ matrix.image }}:buildcache,mode=max | |
- name: Image digest | |
run: echo ${{ steps.docker_build.outputs.digest }} |