Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: github actions image tag propagation (test deployment 3) #27

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}
Loading