mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-01-16 12:43:02 +00:00
Remove unnecessary output sharing between jobs (#6555)
Split step into 2 parts, since only 1 part is needed in the build job
This commit is contained in:
34
.github/workflows/release.yml
vendored
34
.github/workflows/release.yml
vendored
@@ -51,8 +51,6 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
arch: ["amd64", "arm64", "arm/v7", "arm/v6"]
|
arch: ["amd64", "arm64", "arm/v7", "arm/v6"]
|
||||||
base_image: ["debian","alpine"]
|
base_image: ["debian","alpine"]
|
||||||
outputs:
|
|
||||||
base-tags: ${{ steps.determine-version.outputs.BASE_TAGS }}
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Initialize QEMU binfmt support
|
- name: Initialize QEMU binfmt support
|
||||||
@@ -90,19 +88,9 @@ jobs:
|
|||||||
NORMALIZED_ARCH="${MATRIX_ARCH//\/}"
|
NORMALIZED_ARCH="${MATRIX_ARCH//\/}"
|
||||||
echo "NORMALIZED_ARCH=${NORMALIZED_ARCH}" | tee -a "${GITHUB_ENV}"
|
echo "NORMALIZED_ARCH=${NORMALIZED_ARCH}" | tee -a "${GITHUB_ENV}"
|
||||||
|
|
||||||
# Determine Base Tags and Source Version
|
# Determine Source Version
|
||||||
- name: Determine Base Tags and Source Version
|
- name: Determine Source Version
|
||||||
id: determine-version
|
|
||||||
env:
|
|
||||||
REF_TYPE: ${{ github.ref_type }}
|
|
||||||
run: |
|
run: |
|
||||||
# Check which main tag we are going to build determined by ref_type
|
|
||||||
if [[ "${REF_TYPE}" == "tag" ]]; then
|
|
||||||
echo "BASE_TAGS=latest,${GITHUB_REF#refs/*/}" | tee -a "${GITHUB_OUTPUT}"
|
|
||||||
elif [[ "${REF_TYPE}" == "branch" ]]; then
|
|
||||||
echo "BASE_TAGS=testing" | tee -a "${GITHUB_OUTPUT}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Get the Source Version for this release
|
# Get the Source Version for this release
|
||||||
GIT_EXACT_TAG="$(git describe --tags --abbrev=0 --exact-match 2>/dev/null || true)"
|
GIT_EXACT_TAG="$(git describe --tags --abbrev=0 --exact-match 2>/dev/null || true)"
|
||||||
if [[ -n "${GIT_EXACT_TAG}" ]]; then
|
if [[ -n "${GIT_EXACT_TAG}" ]]; then
|
||||||
@@ -111,7 +99,6 @@ jobs:
|
|||||||
GIT_LAST_TAG="$(git describe --tags --abbrev=0)"
|
GIT_LAST_TAG="$(git describe --tags --abbrev=0)"
|
||||||
echo "SOURCE_VERSION=${GIT_LAST_TAG}-${SOURCE_COMMIT:0:8}" | tee -a "${GITHUB_ENV}"
|
echo "SOURCE_VERSION=${GIT_LAST_TAG}-${SOURCE_COMMIT:0:8}" | tee -a "${GITHUB_ENV}"
|
||||||
fi
|
fi
|
||||||
# End Determine Base Tags
|
|
||||||
|
|
||||||
# Login to Docker Hub
|
# Login to Docker Hub
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
@@ -260,15 +247,10 @@ jobs:
|
|||||||
name: Merge manifests
|
name: Merge manifests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: docker-build
|
needs: docker-build
|
||||||
|
|
||||||
env:
|
|
||||||
BASE_TAGS: ${{ needs.docker-build.outputs.base-tags }}
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
packages: write # Needed to upload packages and artifacts
|
packages: write # Needed to upload packages and artifacts
|
||||||
attestations: write # Needed to generate an artifact attestation for a build
|
attestations: write # Needed to generate an artifact attestation for a build
|
||||||
id-token: write # Needed to mint the OIDC token necessary to request a Sigstore signing certificate
|
id-token: write # Needed to mint the OIDC token necessary to request a Sigstore signing certificate
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
base_image: ["debian","alpine"]
|
base_image: ["debian","alpine"]
|
||||||
@@ -328,6 +310,18 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "CONTAINER_REGISTRIES=${CONTAINER_REGISTRIES:+${CONTAINER_REGISTRIES},}${QUAY_REPO}" | tee -a "${GITHUB_ENV}"
|
echo "CONTAINER_REGISTRIES=${CONTAINER_REGISTRIES:+${CONTAINER_REGISTRIES},}${QUAY_REPO}" | tee -a "${GITHUB_ENV}"
|
||||||
|
|
||||||
|
# Determine Base Tags
|
||||||
|
- name: Determine Base Tags
|
||||||
|
env:
|
||||||
|
REF_TYPE: ${{ github.ref_type }}
|
||||||
|
run: |
|
||||||
|
# Check which main tag we are going to build determined by ref_type
|
||||||
|
if [[ "${REF_TYPE}" == "tag" ]]; then
|
||||||
|
echo "BASE_TAGS=latest,${GITHUB_REF#refs/*/}" | tee -a "${GITHUB_ENV}"
|
||||||
|
elif [[ "${REF_TYPE}" == "branch" ]]; then
|
||||||
|
echo "BASE_TAGS=testing" | tee -a "${GITHUB_ENV}"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Create manifest list, push it and extract digest SHA
|
- name: Create manifest list, push it and extract digest SHA
|
||||||
working-directory: ${{ runner.temp }}/digests
|
working-directory: ${{ runner.temp }}/digests
|
||||||
env:
|
env:
|
||||||
|
|||||||
Reference in New Issue
Block a user