From be8edaa13f5a6af0e2302b7aa74019c75ff91f7c Mon Sep 17 00:00:00 2001 From: Tom Eichlersmith <31970302+tomeichlersmith@users.noreply.github.com> Date: Tue, 20 May 2025 16:54:16 -0500 Subject: [PATCH 1/3] simplify tags only do `pr-NNN`, `branch-name`, `vX.Y.Z`, `latest`, and `sha-XXXXXXXX` types --- .github/workflows/ci.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5725710..efa21c5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,10 +44,8 @@ jobs: tags: | type=ref,event=branch type=ref,event=pr - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} type=semver,pattern=v{{version}} - type=semver,pattern=v{{major}}.{{minor}} + type=sha,format=short - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -114,10 +112,8 @@ jobs: tags: | type=ref,event=branch type=ref,event=pr - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} type=semver,pattern=v{{version}} - type=semver,pattern=v{{major}}.{{minor}} + type=sha,format=short - name: Login to Docker Hub uses: docker/login-action@v3 @@ -167,12 +163,10 @@ jobs: with: images: ${{ env.REGISTRY_IMAGE }} tags: | - type=ref,event=branch - type=ref,event=pr - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=semver,pattern=v{{version}} - type=semver,pattern=v{{major}}.{{minor}} + type=ref,event=branch + type=ref,event=pr + type=semver,pattern=v{{version}} + type=sha,format=short - name: Install just uses: extractions/setup-just@v3 From 78977aaa4cd01fd0a787f6e11f469cf8a0bfc7fc Mon Sep 17 00:00:00 2001 From: Tom Eichlersmith <31970302+tomeichlersmith@users.noreply.github.com> Date: Fri, 23 May 2025 12:37:09 -0500 Subject: [PATCH 2/3] fix tabbing --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index efa21c5..043bb68 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -163,10 +163,10 @@ jobs: with: images: ${{ env.REGISTRY_IMAGE }} tags: | - type=ref,event=branch - type=ref,event=pr - type=semver,pattern=v{{version}} - type=sha,format=short + type=ref,event=branch + type=ref,event=pr + type=semver,pattern=v{{version}} + type=sha,format=short - name: Install just uses: extractions/setup-just@v3 From 0807182fbd5076e0b1636f60c59fbcd08b6915a7 Mon Sep 17 00:00:00 2001 From: tomeichlersmith Date: Fri, 23 May 2025 13:04:30 -0500 Subject: [PATCH 3/3] share outputs rather than re-run docker-metadata-action --- .github/workflows/ci.yml | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 043bb68..aecce69 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,6 +92,8 @@ jobs: runs-on: ubuntu-latest needs: - build + outputs: + imagejson: ${{ steps.meta.outputs.json }} steps: - name: Download digests @@ -156,17 +158,6 @@ jobs: - name: Download Build Context for Test Script uses: actions/checkout@v4 - - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY_IMAGE }} - tags: | - type=ref,event=branch - type=ref,event=pr - type=semver,pattern=v{{version}} - type=sha,format=short - name: Install just uses: extractions/setup-just@v3 @@ -174,4 +165,4 @@ jobs: just-version: 1.26.0 - name: Test the Image - run: ./ci/test-ldmx-sw $(jq -r .tags[0] <<< "${DOCKER_METADATA_OUTPUT_JSON}") ${{ matrix.ldmx_sw }} + run: ./ci/test-ldmx-sw $(echo '${{ needs.merge.outputs.imagejson }}' | jq -r .tags[0]) ${{ matrix.ldmx_sw }}