From 3e73265e0262adb5d763dd6ec799ed611d8d8e86 Mon Sep 17 00:00:00 2001 From: Liu-Cheng Xu Date: Sat, 13 Jul 2024 20:08:17 +0800 Subject: [PATCH] Remove untagged docker versions --- .github/workflows/docker.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 1c5bc1df..da448e4d 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -9,6 +9,9 @@ on: - 'release/**' tags: - '**' + pull_request: + branches: + - main jobs: container-linux: @@ -60,8 +63,9 @@ jobs: images: | ghcr.io/subcoin-project/subcoin tags: | - type=ref,event=tag type=ref,event=branch + type=ref,event=tag + type=sha flavor: | latest=false suffix=${{ matrix.platform.image-suffix }} @@ -77,6 +81,9 @@ jobs: push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + # Added to prevent tons of untagged images in GHCR. + # See: https://github.com/docker/build-push-action/issues/894 + provenance: false build-args: | SUBSTRATE_CLI_GIT_COMMIT_HASH=${{ github.sha }} PROFILE=${{ matrix.platform.profile }}