Skip to content

Commit

Permalink
Merge pull request #390 from Gregory-Pereira/cleanup-CI_AUTOMATION-fa…
Browse files Browse the repository at this point in the history
…ilures-in-worfklow-v3

FIXING CI: make sure to access step output in github action syntax
  • Loading branch information
vishnoianil authored Dec 4, 2024
2 parents 37843ee + e4ffe89 commit e11339f
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions .github/workflows/pr-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,27 +42,27 @@ jobs:
fi
- name: Log in to the GHCR container image registry
if: steps.check_skip.outputs.skip_workflow == 'false'
if: ${{ steps.check_skip.outputs.skip_workflow == 'false' }}
uses: docker/login-action@v3
with:
registry: "${{ env.GHCR_REGISTRY }}"
username: "${{ github.actor }}"
password: "${{ secrets.GITHUB_TOKEN }}"

- name: Log in to the Quay container image registry
if: steps.check_skip.outputs.skip_workflow == 'false'
if: ${{ steps.check_skip.outputs.skip_workflow == 'false' }}
uses: docker/login-action@v3
with:
registry: "${{ env.QUAY_REGISTRY }}"
username: "${{ secrets.QUAY_USERNAME }}"
password: "${{ secrets.QUAY_TOKEN }}"

- name: Set up Docker Buildx
if: steps.check_skip.outputs.skip_workflow == 'false'
if: ${{ steps.check_skip.outputs.skip_workflow == 'false' }}
uses: docker/setup-buildx-action@v3

- name: Cache Docker layers
if: steps.check_skip.outputs.skip_workflow == 'false'
if: ${{ steps.check_skip.outputs.skip_workflow == 'false' }}
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
Expand All @@ -71,7 +71,7 @@ jobs:
"${{ runner.os }}-buildx-"
- name: Get Pull Request Number from Commit
if: steps.check_skip.outputs.skip_workflow == 'false'
if: ${{ steps.check_skip.outputs.skip_workflow == 'false' }}
id: get_pr_number
uses: actions/github-script@v7
with:
Expand Down Expand Up @@ -101,21 +101,21 @@ jobs:
return '';
- name: Extract GHCR metadata (tags, labels) for UI image
if: steps.check_skip.outputs.skip_workflow == 'false'
if: ${{ steps.check_skip.outputs.skip_workflow == 'false' }}
id: ghcr_ui_meta
uses: docker/metadata-action@v5
with:
images: ${{ env.GHCR_REGISTRY }}/${{ env.GHCR_UI_IMAGE_NAME }}

- name: Extract Quay metadata (tags, labels) for UI image
if: steps.check_skip.outputs.skip_workflow == 'false'
if: ${{ steps.check_skip.outputs.skip_workflow == 'false' }}
id: quay_ui_meta
uses: docker/metadata-action@v5
with:
images: ${{ env.QUAY_REGISTRY }}/${{ env.QUAY_UI_IMAGE_NAME }}

- name: Build and push ui image to ghcr.io
if: steps.check_skip.outputs.skip_workflow == 'false'
if: ${{ steps.check_skip.outputs.skip_workflow == 'false' }}
id: push-ui-ghcr
uses: docker/build-push-action@v6
with:
Expand All @@ -131,15 +131,15 @@ jobs:
file: src/Containerfile

- name: Generate GHCR artifact attestation
if: steps.check_skip.outputs.skip_workflow == 'false'
if: ${{ steps.check_skip.outputs.skip_workflow == 'false' }}
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.GHCR_REGISTRY }}/${{ env.GHCR_UI_IMAGE_NAME}}
subject-digest: ${{ steps.push-ui-ghcr.outputs.digest }}
push-to-registry: true

- name: Build and push ui image to quay.io
if: steps.check_skip.outputs.skip_workflow == 'false'
if: ${{ steps.check_skip.outputs.skip_workflow == 'false' }}
id: push-ui-quay
uses: docker/build-push-action@v6
with:
Expand All @@ -155,20 +155,20 @@ jobs:
file: src/Containerfile

- name: Generate QA UI Quay artifact attestation
if: steps.check_skip.outputs.skip_workflow == 'false'
if: ${{ steps.check_skip.outputs.skip_workflow == 'false' }}
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.QUAY_REGISTRY }}/${{ env.QUAY_UI_IMAGE_NAME}}
subject-digest: ${{ steps.push-ui-quay.outputs.digest }}
push-to-registry: true

- name: Update coderefs before code changes
if: steps.check_skip.outputs.skip_workflow == 'false'
if: ${{ steps.check_skip.outputs.skip_workflow == 'false' }}
run: |-
git pull --ff-only
- name: Update QA Quay UI image
if: steps.check_skip.outputs.skip_workflow == 'false'
if: ${{ steps.check_skip.outputs.skip_workflow == 'false' }}
id: update_qa_ui_manifest_image
env:
PR_TAG: "pr-${{ steps.get_pr_number.outputs.result }}"
Expand All @@ -180,7 +180,7 @@ jobs:
' deploy/k8s/overlays/openshift/qa/kustomization.yaml
- name: Commit and push bump QA UI Image manifest
if: steps.check_skip.outputs.skip_workflow == 'false'
if: ${{ steps.check_skip.outputs.skip_workflow == 'false' }}
run: |-
git config user.name "platform-engineering-bot"
git config user.email "[email protected]"
Expand Down Expand Up @@ -216,27 +216,27 @@ jobs:
fi
- name: Log in to the GHCR container image registry
if: steps.check_skip.outputs.skip_workflow == 'false'
if: ${{ steps.check_skip.outputs.skip_workflow == 'false' }}
uses: docker/login-action@v3
with:
registry: ${{ env.GHCR_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Log in to the Quay container image registry
if: steps.check_skip.outputs.skip_workflow == 'false'
if: ${{ steps.check_skip.outputs.skip_workflow == 'false' }}
uses: docker/login-action@v3
with:
registry: ${{ env.QUAY_REGISTRY }}
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}

- name: Set up Docker Buildx
if: steps.check_skip.outputs.skip_workflow == 'false'
if: ${{ steps.check_skip.outputs.skip_workflow == 'false' }}
uses: docker/setup-buildx-action@v3

- name: Cache Docker layers
if: steps.check_skip.outputs.skip_workflow == 'false'
if: ${{ steps.check_skip.outputs.skip_workflow == 'false' }}
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
Expand All @@ -245,7 +245,7 @@ jobs:
${{ runner.os }}-buildx-
- name: Get Pull Request Number from Commit
if: steps.check_skip.outputs.skip_workflow == 'false'
if: ${{ steps.check_skip.outputs.skip_workflow == 'false' }}
id: get_pr_number
uses: actions/github-script@v7
with:
Expand Down Expand Up @@ -275,21 +275,21 @@ jobs:
return '';
- name: Extract metadata (tags, labels) for pathservice image
if: steps.check_skip.outputs.skip_workflow == 'false'
if: ${{ steps.check_skip.outputs.skip_workflow == 'false' }}
id: ghcr_ps_meta
uses: docker/metadata-action@v5
with:
images: ${{ env.GHCR_REGISTRY }}/${{ env.GHCR_PS_IMAGE_NAME }}

- name: Extract metadata (tags, labels) for pathservice image
if: steps.check_skip.outputs.skip_workflow == 'false'
if: ${{ steps.check_skip.outputs.skip_workflow == 'false' }}
id: quay_ps_meta
uses: docker/metadata-action@v5
with:
images: ${{ env.QUAY_REGISTRY }}/${{ env.QUAY_PS_IMAGE_NAME }}

- name: Build and push QA PS image to ghcr.io
if: steps.check_skip.outputs.skip_workflow == 'false'
if: ${{ steps.check_skip.outputs.skip_workflow == 'false' }}
id: push-ps-ghcr
uses: docker/build-push-action@v6
with:
Expand All @@ -305,15 +305,15 @@ jobs:
file: pathservice/Containerfile

- name: Generate QA PS GHCR artifact attestation
if: steps.check_skip.outputs.skip_workflow == 'false'
if: ${{ steps.check_skip.outputs.skip_workflow == 'false' }}
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.GHCR_REGISTRY }}/${{ env.GHCR_PS_IMAGE_NAME}}
subject-digest: ${{ steps.push-ps-ghcr.outputs.digest }}
push-to-registry: true

- name: Build and push QA PS image to quay.io
if: steps.check_skip.outputs.skip_workflow == 'false'
if: ${{ steps.check_skip.outputs.skip_workflow == 'false' }}
id: push-ps-quay
uses: docker/build-push-action@v6
with:
Expand All @@ -329,7 +329,7 @@ jobs:
file: pathservice/Containerfile

- name: Generate QA PS Quay artifact attestation
if: steps.check_skip.outputs.skip_workflow == 'false'
if: ${{ steps.check_skip.outputs.skip_workflow == 'false' }}
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.QUAY_REGISTRY }}/${{ env.QUAY_PS_IMAGE_NAME}}
Expand All @@ -338,12 +338,12 @@ jobs:


- name: Update coderefs before code changes
if: steps.check_skip.outputs.skip_workflow == 'false'
if: ${{ steps.check_skip.outputs.skip_workflow == 'false' }}
run: |-
git pull --ff-only
- name: Update QA PS Quay image
if: steps.check_skip.outputs.skip_workflow == 'false'
if: ${{ steps.check_skip.outputs.skip_workflow == 'false' }}
id: update_qa_ps_manifest_image
env:
PR_TAG: "pr-${{ steps.get_pr_number.outputs.result }}"
Expand All @@ -355,7 +355,7 @@ jobs:
' deploy/k8s/overlays/openshift/qa/kustomization.yaml
- name: Commit and push bump QA PS Image manifest
if: steps.check_skip.outputs.skip_workflow == 'false'
if: ${{ steps.check_skip.outputs.skip_workflow == 'false' }}
run: |-
git config user.name "platform-engineering-bot"
git config user.email "[email protected]"
Expand Down

0 comments on commit e11339f

Please sign in to comment.