Skip to content

Commit

Permalink
Update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jtrouth committed Dec 28, 2023
1 parent 4c0ee96 commit 8c82a15
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/build-and-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ jobs:
name: Build Container Image
runs-on: ubuntu-latest
outputs:
deploy_tag: ${{ steps.deploy-tag.outputs.tag }}
deploy_tag: ${{ steps.deploy-tag.outputs.deploy_tag }}
image_name: ${{ steps.deploy-tag.outputs.image_name }}
steps:
-
name: Checkout
Expand Down Expand Up @@ -52,9 +53,10 @@ jobs:
name: Parse deployment tag
id: deploy-tag
run: |
tag=$(echo "$DOCKER_METADATA_OUTPUT_JSON" | jq -r '.tags[] | select(. | test(":sha-|:v."))')
echo $tag | cut -f2 -d:
echo tag=$(echo $tag | cut -f2 -d:) >> "$GITHUB_OUTPUT"
full_tag=$(echo "$DOCKER_METADATA_OUTPUT_JSON" | jq -r '.tags[] | select(. | test(":sha-|:v."))')
echo $full_tag | cut -f2 -d:
echo deploy_tag=$(echo $full_tag | cut -f2 -d:) >> "$GITHUB_OUTPUT"
echo image_name=$(echo $full_tag | cut -f2 -d:) >> "$GITHUB_OUTPUT"
-
name: Set up QEMU
Expand Down Expand Up @@ -109,6 +111,7 @@ jobs:
with:
environment: prod
image_tag: ${{ needs.docker.outputs.deploy_tag }}
image_name: ${{ needs.docker.outputs.image_name }}

deploy-int:
name: Deploy Int
Expand All @@ -118,4 +121,5 @@ jobs:
if: ${{ github.ref == 'master' || (github.base_ref == 'master') }}
with:
environment: int
image_tag: ${{ needs.docker.outputs.deploy_tag }}
image_tag: ${{ needs.docker.outputs.deploy_tag }}
image_name: ${{ needs.docker.outputs.image_name }}
8 changes: 7 additions & 1 deletion .github/workflows/deploy-gke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@ on:
type: string
required: true
image_tag:
description: The API image tag to deploy
description: The container image tag to deploy
type: string
required: false
default: latest
image_name:
description: The repo URL (minus the tag) of the container image to deploy
type: string
required: true
preview:
description: A boolean indicating if this is a preview deployment
type: boolean
Expand Down Expand Up @@ -49,6 +53,8 @@ jobs:
parameters:
- name: api.image.tag
value: ${{ inputs.image_tag }}
- name: api.image.name
value: $${{ inputs.image_name }}
operation:
initiatedBy:
username: ${{ github.actor }}
Expand Down

0 comments on commit 8c82a15

Please sign in to comment.