Skip to content

Commit 8801b47

Browse files
authored
Remove unnecessary output sharing between jobs (#6555)
Split step into 2 parts, since only 1 part is needed in the build job
1 parent 1ae9dc4 commit 8801b47

File tree

1 file changed

+14
-20
lines changed

1 file changed

+14
-20
lines changed

.github/workflows/release.yml

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ jobs:
5151
matrix:
5252
arch: ["amd64", "arm64", "arm/v7", "arm/v6"]
5353
base_image: ["debian","alpine"]
54-
outputs:
55-
base-tags: ${{ steps.determine-version.outputs.BASE_TAGS }}
5654

5755
steps:
5856
- name: Initialize QEMU binfmt support
@@ -90,19 +88,9 @@ jobs:
9088
NORMALIZED_ARCH="${MATRIX_ARCH//\/}"
9189
echo "NORMALIZED_ARCH=${NORMALIZED_ARCH}" | tee -a "${GITHUB_ENV}"
9290
93-
# Determine Base Tags and Source Version
94-
- name: Determine Base Tags and Source Version
95-
id: determine-version
96-
env:
97-
REF_TYPE: ${{ github.ref_type }}
91+
# Determine Source Version
92+
- name: Determine Source Version
9893
run: |
99-
# Check which main tag we are going to build determined by ref_type
100-
if [[ "${REF_TYPE}" == "tag" ]]; then
101-
echo "BASE_TAGS=latest,${GITHUB_REF#refs/*/}" | tee -a "${GITHUB_OUTPUT}"
102-
elif [[ "${REF_TYPE}" == "branch" ]]; then
103-
echo "BASE_TAGS=testing" | tee -a "${GITHUB_OUTPUT}"
104-
fi
105-
10694
# Get the Source Version for this release
10795
GIT_EXACT_TAG="$(git describe --tags --abbrev=0 --exact-match 2>/dev/null || true)"
10896
if [[ -n "${GIT_EXACT_TAG}" ]]; then
@@ -111,7 +99,6 @@ jobs:
11199
GIT_LAST_TAG="$(git describe --tags --abbrev=0)"
112100
echo "SOURCE_VERSION=${GIT_LAST_TAG}-${SOURCE_COMMIT:0:8}" | tee -a "${GITHUB_ENV}"
113101
fi
114-
# End Determine Base Tags
115102
116103
# Login to Docker Hub
117104
- name: Login to Docker Hub
@@ -260,15 +247,10 @@ jobs:
260247
name: Merge manifests
261248
runs-on: ubuntu-latest
262249
needs: docker-build
263-
264-
env:
265-
BASE_TAGS: ${{ needs.docker-build.outputs.base-tags }}
266-
267250
permissions:
268251
packages: write # Needed to upload packages and artifacts
269252
attestations: write # Needed to generate an artifact attestation for a build
270253
id-token: write # Needed to mint the OIDC token necessary to request a Sigstore signing certificate
271-
272254
strategy:
273255
matrix:
274256
base_image: ["debian","alpine"]
@@ -328,6 +310,18 @@ jobs:
328310
run: |
329311
echo "CONTAINER_REGISTRIES=${CONTAINER_REGISTRIES:+${CONTAINER_REGISTRIES},}${QUAY_REPO}" | tee -a "${GITHUB_ENV}"
330312
313+
# Determine Base Tags
314+
- name: Determine Base Tags
315+
env:
316+
REF_TYPE: ${{ github.ref_type }}
317+
run: |
318+
# Check which main tag we are going to build determined by ref_type
319+
if [[ "${REF_TYPE}" == "tag" ]]; then
320+
echo "BASE_TAGS=latest,${GITHUB_REF#refs/*/}" | tee -a "${GITHUB_ENV}"
321+
elif [[ "${REF_TYPE}" == "branch" ]]; then
322+
echo "BASE_TAGS=testing" | tee -a "${GITHUB_ENV}"
323+
fi
324+
331325
- name: Create manifest list, push it and extract digest SHA
332326
working-directory: ${{ runner.temp }}/digests
333327
env:

0 commit comments

Comments
 (0)