From 5b23f436caffcdfdc1a6f5424d81dbde080c6a0e Mon Sep 17 00:00:00 2001 From: "E. Lynette Rayle" Date: Mon, 28 Oct 2024 20:51:39 -0400 Subject: [PATCH 1/2] set value to return as docker-image-name-with-tag --- .github/workflows/app-build-docker-image.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/app-build-docker-image.yml b/.github/workflows/app-build-docker-image.yml index 0ac2bbe..22ed940 100644 --- a/.github/workflows/app-build-docker-image.yml +++ b/.github/workflows/app-build-docker-image.yml @@ -39,7 +39,7 @@ on: outputs: docker-image-name-with-tag: - value: ${{ jobs.determine-image-name.outputs.docker-image-name-with-tag }} + value: ${{ jobs.build-image-names.outputs.docker-image-to-use }} jobs: check-deployable: @@ -55,6 +55,7 @@ jobs: runs-on: ubuntu-latest outputs: names-with-tags: ${{ env.DOCKER_IMAGE_TAGS }} + docker-image-to-use: ${{ env.DOCKER_IMAGE_TO_USE }} steps: - name: Checkout this repo uses: actions/checkout@v4.1.1 @@ -76,13 +77,17 @@ jobs: - name: Add ghcr.io id: add-ghcr run: | - echo "DOCKER_IMAGE_TAGS=ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}" >> $GITHUB_ENV + ghcr_image_tags="ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}" + echo "DOCKER_IMAGE_TAGS=$ghcr_image_tags" >> $GITHUB_ENV + echo "DOCKER_IMAGE_TO_USE=$ghcr_image_tags" >> $GITHUB_ENV - name: add-dockerhub if: ${{ inputs.docker-hub-username != '' }} id: add-dockerhub run: | - echo "DOCKER_IMAGE_TAGS=${{ env.DOCKER_IMAGE_TAGS }},${{ inputs.docker-hub-username }}/${{ env.IMAGE_NAME }}" >> $GITHUB_ENV - + docker_image_tags="${{ inputs.docker-hub-username }}/${{ env.IMAGE_NAME }}" + echo "DOCKER_IMAGE_TAGS=${{ env.DOCKER_IMAGE_TAGS }}, $docker_image_tags" >> $GITHUB_ENV + # use Docker Hub image if it is created by overwriting DOCKER_IMAGE_TO_USE + echo "DOCKER_IMAGE_TO_USE=$docker_image_tags" >> $GITHUB_ENV build-docker-image: name: Build Image From f675f1747d3bc7a6cc0795497a4cfebf9caa7762 Mon Sep 17 00:00:00 2001 From: "E. Lynette Rayle" Date: Tue, 29 Oct 2024 00:04:19 -0400 Subject: [PATCH 2/2] update tag reference for reusable workflows to v3.1.2 --- .github/workflows/app-build-and-deploy.yml | 2 +- .github/workflows/app-build-docker-image.yml | 2 +- .github/workflows/app-is-deployable.yml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/app-build-and-deploy.yml b/.github/workflows/app-build-and-deploy.yml index 217e7b5..697f529 100644 --- a/.github/workflows/app-build-and-deploy.yml +++ b/.github/workflows/app-build-and-deploy.yml @@ -85,7 +85,7 @@ jobs: uses: actions/checkout@v4.1.1 with: repository: 'clearlydefined/operations' - ref: 'v3.1.1' + ref: 'v3.1.2' path: 'operations' - name: Get version from package-lock.json id: get_version diff --git a/.github/workflows/app-build-docker-image.yml b/.github/workflows/app-build-docker-image.yml index 22ed940..67d66c7 100644 --- a/.github/workflows/app-build-docker-image.yml +++ b/.github/workflows/app-build-docker-image.yml @@ -61,7 +61,7 @@ jobs: uses: actions/checkout@v4.1.1 with: repository: 'clearlydefined/operations' - ref: 'v3.1.1' + ref: 'v3.1.2' path: 'operations' - name: Determine Image Name id: determine-image-name diff --git a/.github/workflows/app-is-deployable.yml b/.github/workflows/app-is-deployable.yml index 9805f14..d2fd360 100644 --- a/.github/workflows/app-is-deployable.yml +++ b/.github/workflows/app-is-deployable.yml @@ -26,7 +26,7 @@ jobs: uses: actions/checkout@v4.1.1 with: repository: 'clearlydefined/operations' - ref: 'v3.1.1' + ref: 'v3.1.2' path: 'operations' - id: confirm-dev shell: bash @@ -47,7 +47,7 @@ jobs: uses: actions/checkout@v4.1.1 with: repository: 'clearlydefined/operations' - ref: 'v3.1.1' + ref: 'v3.1.2' path: 'operations' - name: Get organization ID