Skip to content

Commit

Permalink
fix: github actions image tag propagation
Browse files Browse the repository at this point in the history
  • Loading branch information
dennis-tra committed Dec 4, 2024
1 parent 38b05b4 commit 8513702
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Test, Build & Push (dev)
on:
workflow_call:
outputs:
image_tag:
imageTag:
description: "The image tag that was pushed to ECR"
value: ${{ jobs.push_to_ecr.outputs.image_tag }}
value: ${{ jobs.push_to_ecr.outputs.imageTag }}

# TODO: move to workflow inputs:
env:
Expand All @@ -18,7 +18,7 @@ jobs:
name: Build & Push
runs-on: ubuntu-latest
outputs:
image_tag: ${{ steps.meta.outputs.image }}
imageTag: ${{ steps.meta.outputs.image }}
steps:
- name: Checking out the Repository
uses: actions/checkout@v4
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Deployment (prod)

on:
workflow_call:
inputs:
imageTag:
required: true
type: string
secrets:
slack_webhook_url:
required: true
Expand Down Expand Up @@ -65,7 +69,7 @@ jobs:
with:
task-definition: task-definition-cleaned.json
container-name: prod-use1-cmi-ants-celestia-watch
image: ${{ needs.build_push.outputs.image_tag }}
image: ${{ inputs.imageTag }}

- name: Deploying to Amazon ECS
uses: aws-actions/amazon-ecs-deploy-task-definition@v2
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/push_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ jobs:
id-token: write
contents: read


deploy:
name: Ants
uses: ./.github/workflows/deploy.yml
needs: build_push
permissions:
id-token: write
contents: read
with:
imageTag: ${{ needs.build_push.outputs.imageTag }}
secrets:
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}

0 comments on commit 8513702

Please sign in to comment.