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

workflow #5

Merged
merged 7 commits into from
Mar 4, 2024
Merged
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
22 changes: 8 additions & 14 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ on:
branches: [ "main" ]

jobs:

build:

aws-auth:
runs-on: ubuntu-latest
outputs:
ecr_registry: ${{ steps.login-ecr.outputs.registry }}

steps:

- name: Check out code
uses: actions/checkout@v3

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
Expand All @@ -22,19 +25,10 @@ jobs:
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1

build:

runs-on: ubuntu-latest
needs: aws-auth

steps:
- name: Check out code
uses: actions/checkout@v3

- name: Build, tag, and push image to Amazon ECR
- name: Build, tag, and push image to Amazon ECR
env:
ECR_REGISTRY: ${{ needs.aws-auth.outputs.ecr_registry }}
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: fiap-tech-challenge-api
IMAGE_TAG: latest
run: |
Expand Down
Loading