From c9c1b3ec5eff12cdab6b7c12fb30a1b0577e96ad Mon Sep 17 00:00:00 2001 From: ryantiffany Date: Wed, 5 Jun 2024 13:45:51 -0500 Subject: [PATCH] Correcting action for build and push --- .github/workflows/build-push-container.yaml | 9 +++---- .github/workflows/test-output.yaml | 29 --------------------- 2 files changed, 3 insertions(+), 35 deletions(-) delete mode 100644 .github/workflows/test-output.yaml diff --git a/.github/workflows/build-push-container.yaml b/.github/workflows/build-push-container.yaml index 6a2d117..0a3ceaa 100644 --- a/.github/workflows/build-push-container.yaml +++ b/.github/workflows/build-push-container.yaml @@ -4,9 +4,6 @@ on: - push env: GITHUB_SHA: ${{ github.sha }} - REGISTRY_URL: us.icr.io - IMAGE_NAME: dts-ce-py-app - REGISTRY_NAMESPACE: rtiffany jobs: build-push-update: @@ -26,7 +23,7 @@ jobs: id: build-image uses: redhat-actions/buildah-build@v2 with: - image: ${{ env.REGISTRY_NAMESPACE }}/${{ env.IMAGE_NAME }} + image: ${{ vars.REGISTRY_NAMESPACE }}/${{ vars.REGISTRY_IMAGE }} tags: latest ${{ env.SHORT_SHA }} containerfiles: | ./Dockerfile @@ -34,7 +31,7 @@ jobs: - name: Log in to the IBM Cloud Container registry uses: redhat-actions/podman-login@v1 with: - registry: ${{ env.REGISTRY_URL }} + registry: ${{ vars.REGISTRY_ENDPOINT }} username: iamapikey password: ${{ secrets.REGISTRY_PASSWORD }} @@ -44,7 +41,7 @@ jobs: with: image: ${{ steps.build-image.outputs.image }} tags: ${{ steps.build-image.outputs.tags }} - registry: ${{ env.REGISTRY_URL }} + registry: ${{ vars.REGISTRY_ENDPOINT }} - name: Print image url run: echo "Image pushed to ${{ steps.push-to-icr.outputs.registry-paths }}" diff --git a/.github/workflows/test-output.yaml b/.github/workflows/test-output.yaml deleted file mode 100644 index 932f0cc..0000000 --- a/.github/workflows/test-output.yaml +++ /dev/null @@ -1,29 +0,0 @@ -name: Test output being sent to webhook - -on: - - push -env: - GITHUB_SHA: ${{ github.sha }} - REGISTRY_URL: us.icr.io - IMAGE_NAME: dts-ce-py-app - REGISTRY_NAMESPACE: rtiffany - -jobs: - job1: - runs-on: ubuntu-latest - outputs: - output1: ${{ steps.step1.outputs.test }} - output2: ${{ steps.step2.outputs.test }} - steps: - - id: step1 - run: echo "image=${{ env.IMAGE_NAME }}" >> "$GITHUB_OUTPUT" - - id: step2 - run: echo "tag=${{ env.GITHUB_SHA }}" >> "$GITHUB_OUTPUT" - job2: - runs-on: ubuntu-latest - needs: job1 - steps: - - env: - OUTPUT1: ${{needs.job1.outputs.output1}} - OUTPUT2: ${{needs.job1.outputs.output2}} - run: echo "$OUTPUT1 $OUTPUT2" \ No newline at end of file