From 07c00eb86f5966181df90a9737f1fa3e85fd614b Mon Sep 17 00:00:00 2001 From: Liu-Cheng Xu Date: Sat, 13 Jul 2024 20:47:51 +0800 Subject: [PATCH] Remove untagged docker versions (#20) * Remove untagged docker versions * Do not run docker on PR --- .github/workflows/docker.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 1c5bc1dfe4c05..24586447ddb9b 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -60,8 +60,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 +78,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 }}