Change workflow implementation to use different files for each step #5
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: CI/CD Pipeline | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
permissions: | |
id-token: write # allows creation of an OIDC token | |
contents: read | |
uses: ./.github/workflows/build-steps.yml | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
if: ${{ always() }} # Ensure this job only runs if the build workflow succeeded | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set image URI | |
run: echo "IMAGE_URI=${{ needs.build.outputs.image }}" >> $GITHUB_ENV | |
- name: Deploy to EKS | |
uses: ./.github/workflows/deploy-steps.yml | |
with: | |
image: ${{ needs.build.outputs.image }} |