" >> ${GITHUB_STEP_SUMMARY}
- echo "Build Context | Value |
" >> ${GITHUB_STEP_SUMMARY}
- echo "Helm chart version | ${{ steps.get_context.outputs.CHART_VERSION }} |
" >> ${GITHUB_STEP_SUMMARY}
- echo "Original registry | ${{ steps.get_context.outputs.ORIGINAL_REGISTRY }} |
" >> ${GITHUB_STEP_SUMMARY}
- echo "Original repository | ${{ steps.get_context.outputs.ORIGINAL_REPO }} |
" >> ${GITHUB_STEP_SUMMARY}
- echo "Original tag | ${{ steps.get_context.outputs.ORIGINAL_TAG }} |
" >> ${GITHUB_STEP_SUMMARY}
- echo "Original image | ${{ steps.get_context.outputs.ORIGINAL_IMAGE }} |
" >> ${GITHUB_STEP_SUMMARY}
- echo "Build registry | ${{ steps.get_context.outputs.BUILD_REGISTRY }} |
" >> ${GITHUB_STEP_SUMMARY}
- echo "Build repository | ${{ steps.get_context.outputs.BUILD_REPO }} |
" >> ${GITHUB_STEP_SUMMARY}
- echo "Build tag | ${BUILD_TAG} |
" >> ${GITHUB_STEP_SUMMARY}
- echo "Build image | ${BUILD_IMAGE} |
" >> ${GITHUB_STEP_SUMMARY}
- echo "Ref tags | ${REF_TAGS} |
" >> ${GITHUB_STEP_SUMMARY}
- echo "All build images | ${{ steps.meta.outputs.tags }} |
" >> ${GITHUB_STEP_SUMMARY}
- echo "Build labels | ${{ steps.meta.outputs.labels }} |
" >> ${GITHUB_STEP_SUMMARY}
- echo "
" >> ${GITHUB_STEP_SUMMARY}
- echo "" >> ${GITHUB_STEP_SUMMARY}
- echo "" >> ${GITHUB_STEP_SUMMARY}
- echo "Setting | Value |
" >> ${GITHUB_STEP_SUMMARY}
- echo "Run Docs | $(get_output ${{ steps.conditionals.outputs.skip_docs }}) |
" >> ${GITHUB_STEP_SUMMARY}
- echo "Run Build | $(get_output ${{ steps.conditionals.outputs.skip_build }}) |
" >> ${GITHUB_STEP_SUMMARY}
- echo "Run Compliance | $(get_output ${{ steps.conditionals.outputs.skip_compliance_checks }}) |
" >> ${GITHUB_STEP_SUMMARY}
- echo "Run Unit Tests | $(get_output ${{ steps.conditionals.outputs.skip_unit_tests }}) |
" >> ${GITHUB_STEP_SUMMARY}
- echo "Run SAST | $(get_output ${{ steps.conditionals.outputs.skip_sast }}) |
" >> ${GITHUB_STEP_SUMMARY}
- echo "Run SCA | $(get_output ${{ steps.conditionals.outputs.skip_sca }}) |
" >> ${GITHUB_STEP_SUMMARY}
- echo "Run Integration Tests | $(get_output ${{ steps.conditionals.outputs.skip_integration_tests }}) |
" >> ${GITHUB_STEP_SUMMARY}
- echo "Report type | ${{ steps.conditionals.outputs.output_type }} |
" >> ${GITHUB_STEP_SUMMARY}
- echo "
" >> ${GITHUB_STEP_SUMMARY}
- echo "($(get_output 'none') - run all jobs, $(get_output 'non-required') - run important/required jobs only, $(get_output 'all') - skip jobs)" >> ${GITHUB_STEP_SUMMARY}
- echo "" >> ${GITHUB_STEP_SUMMARY}
-
- build:
- uses: ./.github/workflows/.reusable-build.yml
- needs: [conditionals]
- permissions:
- packages: write
- secrets: inherit
- with:
- skip: ${{ needs.conditionals.outputs.skip_build }}
-
- compliance:
- uses: ./.github/workflows/.reusable-compliance.yml
- needs: [conditionals]
- permissions:
- contents: write
- id-token: write
- security-events: write
- actions: read
- checks: read
- deployments: read
- issues: read
- discussions: read
- packages: read
- pages: read
- pull-requests: read
- repository-projects: read
- statuses: read
- attestations: read
- secrets: inherit
- with:
- skip: ${{ needs.conditionals.outputs.skip_compliance_checks }}
-
- unit-test:
- uses: ./.github/workflows/.reusable-unit-test.yml
- needs: [conditionals]
- with:
- skip: ${{ needs.conditionals.outputs.skip_unit_tests }}
-
- sast:
- uses: ./.github/workflows/.reusable-sast.yml
- needs: [conditionals]
- permissions:
- security-events: write
- pull-requests: read
- with:
- skip: ${{ needs.conditionals.outputs.skip_sast }}
- output: ${{ needs.conditionals.outputs.output_type }}
-
- sca:
- uses: ./.github/workflows/.reusable-sca.yml
- needs: [conditionals, build]
- permissions:
- contents: write
- security-events: write
- packages: read
- secrets: inherit
- with:
- registry: ${{ needs.build.outputs.build_registry }}
- repo_owner: ${{ github.repository_owner }}
- image: ${{ needs.build.outputs.build_image }}
- skip: ${{ needs.conditionals.outputs.skip_sca }}
- output: ${{ needs.conditionals.outputs.output_type }}
-
- docs:
- uses: ./.github/workflows/.reusable-docs.yaml
- needs: [conditionals]
- permissions:
- contents: write
- with:
- skip: ${{ needs.conditionals.outputs.skip_docs }}
-
- integration-test:
- uses: ./.github/workflows/.reusable-integration-test.yml
- needs: [conditionals, build]
- permissions:
- packages: read
- secrets: inherit
- with:
- build_registry: ${{ needs.build.outputs.build_registry }}
- repo_owner: ${{ github.repository_owner }}
- build_image_repository: ${{ needs.build.outputs.build_registry }}/${{ needs.build.outputs.build_repo }}
- build_tag: ${{ needs.build.outputs.build_tag }}
- skip: ${{ needs.conditionals.outputs.skip_integration_tests }}
- cosign_public_key: ${{ needs.build.outputs.cosign_public_key }}
diff --git a/.github/workflows/00_pr.yml b/.github/workflows/00_pr.yml
new file mode 100644
index 000000000..f0ecadde6
--- /dev/null
+++ b/.github/workflows/00_pr.yml
@@ -0,0 +1,36 @@
+name: pr
+
+permissions: {}
+
+on:
+ pull_request:
+ branches:
+ - master
+ - develop
+ push: # for testing
+ branches:
+ - ci/rework
+
+defaults:
+ run:
+ shell: bash
+
+jobs:
+ ci:
+ uses: ./.github/workflows/100_ci.yml
+ # permissions:
+ # packages: write
+ # contents: write
+ # id-token: write
+ # security-events: write
+ # actions: read
+ # checks: read
+ # deployments: read
+ # issues: read
+ # discussions: read
+ # pages: read
+ # pull-requests: read
+ # repository-projects: read
+ # statuses: read
+ # attestations: read
+ secrets: inherit
diff --git a/.github/workflows/push.yml b/.github/workflows/01_push.yml
similarity index 63%
rename from .github/workflows/push.yml
rename to .github/workflows/01_push.yml
index 056377e22..bfa5053e5 100644
--- a/.github/workflows/push.yml
+++ b/.github/workflows/01_push.yml
@@ -14,7 +14,7 @@ defaults:
jobs:
ci:
- uses: ./.github/workflows/.reusable-ci.yml
+ uses: ./.github/workflows/100_ci.yml
permissions:
packages: write
contents: write
@@ -31,12 +31,3 @@ jobs:
statuses: read
attestations: read
secrets: inherit
- with:
- skip_build: "none"
- skip_compliance_checks: "none"
- skip_unit_tests: "none"
- skip_sast: "none"
- skip_sca: "none"
- skip_docs: "none"
- skip_integration_tests: "none"
- output_type: "sarif"
diff --git a/.github/workflows/release.yaml b/.github/workflows/03_release.yaml
similarity index 92%
rename from .github/workflows/release.yaml
rename to .github/workflows/03_release.yaml
index 040628bd3..422edc66e 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/03_release.yaml
@@ -26,7 +26,7 @@ jobs:
echo "skip_integration_tests=${SKIP_INTEGRATION_TESTS}" >> ${GITHUB_OUTPUT}
build:
- uses: ./.github/workflows/.reusable-build.yml
+ uses: ./.github/workflows/101_build.yml
permissions:
packages: write
secrets: inherit
@@ -49,7 +49,7 @@ jobs:
exit 1
integration-test:
- uses: ./.github/workflows/.reusable-integration-test.yml
+ uses: ./.github/workflows/107_integration-test.yml
needs: [conditionals, build, version-match]
permissions:
packages: read
@@ -63,7 +63,7 @@ jobs:
cosign_public_key: ${{ needs.build.outputs.cosign_public_key }}
publish:
- uses: ./.github/workflows/.reusable-publish.yml
+ uses: ./.github/workflows/200_publish.yml
needs: [build, version-match, integration-test]
permissions:
contents: write
diff --git a/.github/workflows/publish.yml b/.github/workflows/04_publish.yml
similarity index 93%
rename from .github/workflows/publish.yml
rename to .github/workflows/04_publish.yml
index f69d82f51..eef352506 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/04_publish.yml
@@ -20,7 +20,7 @@ on:
jobs:
publish:
- uses: ./.github/workflows/.reusable-publish.yml
+ uses: ./.github/workflows/200_publish.yml
permissions:
contents: write
with:
diff --git a/.github/workflows/nightly.yaml b/.github/workflows/05_nightly.yaml
similarity index 65%
rename from .github/workflows/nightly.yaml
rename to .github/workflows/05_nightly.yaml
index a89fc63ca..9ff322e53 100644
--- a/.github/workflows/nightly.yaml
+++ b/.github/workflows/05_nightly.yaml
@@ -12,7 +12,7 @@ defaults:
jobs:
ci:
- uses: ./.github/workflows/.reusable-ci.yml
+ uses: ./.github/workflows/100_ci.yml
permissions:
packages: write
contents: write
@@ -30,16 +30,13 @@ jobs:
attestations: read
secrets: inherit
with:
- skip_build: "none"
- skip_compliance_checks: "none"
- skip_unit_tests: "all"
- skip_sast: "all"
- skip_sca: "none"
- skip_docs: "all"
- skip_integration_tests: "all"
+ unit_tests: "none"
+ sast: "none"
+ docs: "none"
+ integration_tests: "none"
output_type: "table"
cleanup-registry:
- uses: ./.github/workflows/.reusable-cleanup-registry.yml
+ uses: ./.github/workflows/201_cleanup-registry.yml
needs: [ci]
secrets: inherit
diff --git a/.github/workflows/dockerhub-check.yml b/.github/workflows/06_dockerhub-check.yml
similarity index 100%
rename from .github/workflows/dockerhub-check.yml
rename to .github/workflows/06_dockerhub-check.yml
diff --git a/.github/workflows/100_ci.yml b/.github/workflows/100_ci.yml
new file mode 100644
index 000000000..0d82cdefa
--- /dev/null
+++ b/.github/workflows/100_ci.yml
@@ -0,0 +1,178 @@
+name: ci
+
+permissions: {}
+
+on:
+ workflow_call:
+ inputs:
+ build:
+ description: "Which build jobs should be run: 'all', 'required', 'none'?"
+ type: string
+ default: "all"
+ required: false
+ compliance_checks:
+ description: "Which compliance checks should be run: 'all', 'required', 'none'?"
+ type: string
+ default: "all"
+ required: false
+ unit_tests:
+ description: "Which unit tests should be run: 'all', 'required', 'none'?"
+ type: string
+ default: "all"
+ required: false
+ sast:
+ description: "Which sast jobs should be run: 'all', 'required', 'none'?"
+ type: string
+ default: "all"
+ required: false
+ sca:
+ description: "Which sca jobs should be run: 'all', 'required', 'none'?"
+ type: string
+ default: "all"
+ required: false
+ docs:
+ description: "Which doc jobs should be run: 'all', 'required', 'none'?"
+ type: string
+ default: "all"
+ required: false
+ integration_tests:
+ description: "Which integration tests should be run: 'all', 'required', 'none'?"
+ type: string
+ default: "all"
+ required: false
+ output_type:
+ description: 'Output either "sarif" (GITHUB_TOKEN with security-events:write) or print results as "table" and fail on error'
+ type: string
+ default: 'sarif'
+ required: false
+
+defaults:
+ run:
+ shell: bash
+
+jobs:
+ conditionals:
+ runs-on: ubuntu-latest
+ outputs:
+ build: ${{ steps.conditionals.outputs.build }}
+ compliance_checks: ${{ steps.conditionals.outputs.compliance_checks }}
+ unit_tests: ${{ steps.conditionals.outputs.unit_tests }}
+ sast: ${{ steps.conditionals.outputs.sast }}
+ sca: ${{ steps.conditionals.outputs.sca }}
+ docs: ${{ steps.conditionals.outputs.docs }}
+ integration_tests: ${{ steps.conditionals.outputs.integration_tests }}
+ output_type: ${{ steps.conditionals.outputs.output_type }}
+ steps:
+ - name: CI conditionals
+ id: conditionals
+ run: |
+ echo "build=${{ inputs.build }}" >> ${GITHUB_OUTPUT}
+ echo "compliance_checks=${{ inputs.compliance_checks }}" >> ${GITHUB_OUTPUT}
+ echo "unit_tests=${{ inputs.unit_tests }}" >> ${GITHUB_OUTPUT}
+ echo "sast=${{ inputs.sast }}" >> ${GITHUB_OUTPUT}
+ echo "sca=${{ inputs.sca }}" >> ${GITHUB_OUTPUT}
+ echo "docs=${{ inputs.docs }}" >> ${GITHUB_OUTPUT}
+ echo "integration_tests=${{ inputs.integration_tests }}" >> ${GITHUB_OUTPUT}
+ echo "output_type=${{ inputs.output_type }}" >> ${GITHUB_OUTPUT}
+ - name: Show conditionals
+ id: show_conditionals
+ run: |
+ get_output() { case "$1" in "all") echo ":white_check_mark:";; "required") echo ":information_source:";; "all") echo ":x:";; *) echo "Unknown value";; esac; }
+ echo "# :pencil: CI Settings" >> ${GITHUB_STEP_SUMMARY}
+ echo "" >> ${GITHUB_STEP_SUMMARY}
+ echo "Setting | Value |
" >> ${GITHUB_STEP_SUMMARY}
+ echo "Run Docs | $(get_output ${{ steps.conditionals.outputs.docs }}) |
" >> ${GITHUB_STEP_SUMMARY}
+ echo "Run Build | $(get_output ${{ steps.conditionals.outputs.build }}) |
" >> ${GITHUB_STEP_SUMMARY}
+ echo "Run Compliance | $(get_output ${{ steps.conditionals.outputs.compliance_checks }}) |
" >> ${GITHUB_STEP_SUMMARY}
+ echo "Run Unit Tests | $(get_output ${{ steps.conditionals.outputs.unit_tests }}) |
" >> ${GITHUB_STEP_SUMMARY}
+ echo "Run SAST | $(get_output ${{ steps.conditionals.outputs.sast }}) |
" >> ${GITHUB_STEP_SUMMARY}
+ echo "Run SCA | $(get_output ${{ steps.conditionals.outputs.sca }}) |
" >> ${GITHUB_STEP_SUMMARY}
+ echo "Run Integration Tests | $(get_output ${{ steps.conditionals.outputs.integration_tests }}) |
" >> ${GITHUB_STEP_SUMMARY}
+ echo "Report type | ${{ steps.conditionals.outputs.output_type }} |
" >> ${GITHUB_STEP_SUMMARY}
+ echo "
" >> ${GITHUB_STEP_SUMMARY}
+ echo "($(get_output 'all') - run all jobs, $(get_output 'required') - run important/required jobs only, $(get_output 'none') - skip jobs)" >> ${GITHUB_STEP_SUMMARY}
+ echo "" >> ${GITHUB_STEP_SUMMARY}
+
+ # build:
+ # uses: ./.github/workflows/101_build.yml
+ # needs: [conditionals]
+ # permissions:
+ # packages: write
+ # secrets: inherit
+ # with:
+ # run: ${{ needs.conditionals.outputs.build }}
+
+ # compliance:
+ # uses: ./.github/workflows/102_compliance.yml
+ # needs: [conditionals]
+ # permissions:
+ # contents: write
+ # id-token: write
+ # security-events: write
+ # actions: read
+ # checks: read
+ # deployments: read
+ # issues: read
+ # discussions: read
+ # packages: read
+ # pages: read
+ # pull-requests: read
+ # repository-projects: read
+ # statuses: read
+ # attestations: read
+ # secrets: inherit
+ # with:
+ # run: ${{ needs.conditionals.outputs.compliance_checks }}
+
+ # unit-test:
+ # uses: ./.github/workflows/unit-test.yml
+ # needs: [conditionals]
+ # with:
+ # skip: ${{ needs.conditionals.outputs.skip_unit_tests }}
+
+ # sast:
+ # uses: ./.github/workflows/sast.yml
+ # needs: [conditionals]
+ # permissions:
+ # security-events: write
+ # pull-requests: read
+ # with:
+ # skip: ${{ needs.conditionals.outputs.skip_sast }}
+ # output: ${{ needs.conditionals.outputs.output_type }}
+
+ # sca:
+ # uses: ./.github/workflows/sca.yml
+ # needs: [conditionals, build]
+ # permissions:
+ # contents: write
+ # security-events: write
+ # packages: read
+ # secrets: inherit
+ # with:
+ # registry: ${{ needs.build.outputs.build_registry }}
+ # repo_owner: ${{ github.repository_owner }}
+ # image: ${{ needs.build.outputs.build_image }}
+ # skip: ${{ needs.conditionals.outputs.skip_sca }}
+ # output: ${{ needs.conditionals.outputs.output_type }}
+
+ # docs:
+ # uses: ./.github/workflows/docs.yaml
+ # needs: [conditionals]
+ # permissions:
+ # contents: write
+ # with:
+ # skip: ${{ needs.conditionals.outputs.skip_docs }}
+
+ # integration-test:
+ # uses: ./.github/workflows/integration-test.yml
+ # needs: [conditionals, build]
+ # permissions:
+ # packages: read
+ # secrets: inherit
+ # with:
+ # build_registry: ${{ needs.build.outputs.build_registry }}
+ # repo_owner: ${{ github.repository_owner }}
+ # build_image_repository: ${{ needs.build.outputs.build_registry }}/${{ needs.build.outputs.build_repo }}
+ # build_tag: ${{ needs.build.outputs.build_tag }}
+ # skip: ${{ needs.conditionals.outputs.skip_integration_tests }}
+ # cosign_public_key: ${{ needs.build.outputs.cosign_public_key }}
diff --git a/.github/workflows/101_build.yml b/.github/workflows/101_build.yml
new file mode 100644
index 000000000..859afbe9e
--- /dev/null
+++ b/.github/workflows/101_build.yml
@@ -0,0 +1,189 @@
+name: build
+
+permissions: {}
+
+on:
+ workflow_call:
+ inputs:
+ run:
+ description: "Which build jobs should be run: 'all', 'required', 'none'?"
+ type: string
+ default: "all"
+ outputs:
+ chart_version:
+ description: "Connaisseur Helm chart version"
+ value: ${{ jobs.context.outputs.chart_version }}
+ original_registry:
+ description: "Public Connaisseur registry"
+ value: ${{ jobs.context.outputs.original_registry }}
+ original_repo:
+ description: "Public Connaisseur repo"
+ value: ${{ jobs.context.outputs.original_repo }}
+ original_tag:
+ description: "Current Connaisseur tag, i.e. version"
+ value: ${{ jobs.context.outputs.original_tag }}
+ original_image:
+ description: "Full Connaisseur image reference, i.e. registry + repository + tag"
+ value: ${{ jobs.context.outputs.original_image }}
+ build_registry:
+ description: "Workflow build registry used for testing"
+ value: ${{ jobs.context.outputs.build_registry }}
+ build_repo:
+ description: "Workflow build repository used for testing"
+ value: ${{ jobs.context.outputs.build_repo }}
+ build_tag:
+ description: "Workflow build tag used for testing (unique for each run)"
+ value: ${{ jobs.context.outputs.build_tag }}
+ build_image:
+ description: "Workflow build image used for testing, i.e. registry + repository + tag"
+ value: ${{ jobs.context.outputs.build_image }}
+ build_labels:
+ description: "Repository- and workflow-specific build labels"
+ value: ${{ jobs.context.outputs.build_labels }}
+
+jobs:
+ context:
+ runs-on: ubuntu-latest
+ if: inputs.run != 'none'
+ permissions: {}
+ outputs:
+ chart_version: ${{ steps.get_context.outputs.CHART_VERSION }}
+ original_registry: ${{ steps.get_context.outputs.ORIGINAL_REGISTRY }}
+ original_repo: ${{ steps.get_context.outputs.ORIGINAL_REPO }}
+ original_image: ${{ steps.get_context.outputs.ORIGINAL_IMAGE }}
+ original_tag: ${{ steps.get_context.outputs.ORIGINAL_TAG }}
+ build_registry: ${{ steps.get_context.outputs.BUILD_REGISTRY }}
+ build_repo: ${{ steps.get_context.outputs.BUILD_REPO }}
+ build_tag: ${{ steps.get_context.outputs.BUILD_TAG }}
+ build_image: ${{ steps.get_context.outputs.BUILD_IMAGE }}
+ build_labels: ${{ steps.meta.outputs.labels }}
+ ref_tags: ${{ steps.get_context.outputs.REF_TAGS }}
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+ - name: Get chart version
+ id: get_chart_version
+ uses: mikefarah/yq@47f4f8c7939f887e851b35f14def6741b8f5396e # v4.31.2
+ with:
+ cmd: yq '.version' charts/connaisseur/Chart.yaml
+ - name: Get app version
+ id: get_app_version
+ uses: mikefarah/yq@47f4f8c7939f887e851b35f14def6741b8f5396e # v4.31.2
+ with:
+ cmd: yq '.appVersion' charts/connaisseur/Chart.yaml
+ - name: Get original image
+ id: get_original_image_repository
+ uses: mikefarah/yq@47f4f8c7939f887e851b35f14def6741b8f5396e # v4.31.2
+ with:
+ cmd: yq '.kubernetes.deployment.image.repository' charts/connaisseur/values.yaml
+ - name: Get context
+ id: get_context
+ run: |
+ GHREF=${{ github.ref }}
+ echo "github.ref is: ${GHREF}"
+ CHART_VERSION=${{ steps.get_chart_version.outputs.result }}
+ CONFIGURED_IMAGE_REPO=${{ steps.get_original_image_repository.outputs.result }}
+ ORIGINAL_REGISTRY=$(echo "${CONFIGURED_IMAGE_REPO}" | cut -d "/" -f 1)
+ ORIGINAL_REPO=$(echo "${CONFIGURED_IMAGE_REPO}" | cut -d "/" -f 2- | cut -d ":" -f 1)
+ ORIGINAL_TAG=v${{ steps.get_app_version.outputs.result }}
+ BUILD_REGISTRY="ghcr.io"
+ BUILD_REPO=${{ github.repository }}
+ if [[ "${GHREF}" != "refs/heads/master" &&
+ "${GHREF}" != "refs/tags/v"* &&
+ "${GHREF}" != "refs/heads/develop"
+ ]]; then
+ BUILD_REPO="${BUILD_REPO}-test"
+ fi
+
+ echo CHART_VERSION=${CHART_VERSION} >> ${GITHUB_OUTPUT}
+ echo ORIGINAL_REGISTRY=${ORIGINAL_REGISTRY} >> ${GITHUB_OUTPUT}
+ echo ORIGINAL_REPO=${ORIGINAL_REPO} >> ${GITHUB_OUTPUT}
+ echo ORIGINAL_TAG=${ORIGINAL_TAG} >> ${GITHUB_OUTPUT}
+ echo ORIGINAL_IMAGE=${CONFIGURED_IMAGE_REPO}:${ORIGINAL_TAG} >> ${GITHUB_OUTPUT}
+ echo BUILD_REGISTRY=${BUILD_REGISTRY} >> ${GITHUB_OUTPUT}
+ echo BUILD_REPO=${BUILD_REPO} >> ${GITHUB_OUTPUT}
+ shell: bash
+ - name: Generate metadata
+ id: meta
+ uses: docker/metadata-action@507c2f2dc502c992ad446e3d7a5dfbe311567a96 # v4.3.0
+ with:
+ images: ${{ steps.get_context.outputs.BUILD_REGISTRY }}/${{ steps.get_context.outputs.BUILD_REPO }}
+ flavor: |
+ latest=true
+ tags: |
+ type=schedule
+ type=ref,event=branch
+ type=ref,event=tag
+ type=ref,event=pr
+ type=sha
+ - name: Show context
+ id: show_context
+ run: |
+ PREFIX=$(echo "${{ steps.get_context.outputs.BUILD_REGISTRY }}/${{ steps.get_context.outputs.BUILD_REPO }}:" | sed 's%/%\/%g')
+ TAGS="${{ steps.meta.outputs.tags }}"
+ REF_TAGS="${TAGS//${PREFIX}/}"
+ BUILD_IMAGE=$(echo "${TAGS}" | tail -2 | head -1)
+ BUILD_TAG="${BUILD_IMAGE//${PREFIX}/}"
+ [[ ${BUILD_TAG} == "sha-"* ]] || exit 1 # check as parsing of the BUILD_TAG maybe fragile and dependent on docker/metadata-action priorities
+ REF_TAGS="${REF_TAGS//${BUILD_TAG}/}"
+ echo BUILD_TAG=${BUILD_TAG} >> ${GITHUB_OUTPUT}
+ echo BUILD_IMAGE=${BUILD_IMAGE} >> ${GITHUB_OUTPUT}
+ echo REF_TAGS=${REF_TAGS} >> ${GITHUB_OUTPUT}
+ echo "# :clipboard: Context" >> ${GITHUB_STEP_SUMMARY}
+ echo "