diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2c80c0d..367e289 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -111,7 +111,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Push to github container registry if: ${{ success() && steps.login.conclusion != 'skipped' }} - run: "make push_${{ matrix.img }}" + run: "make tag_latest_${{ matrix.img }} push_${{ matrix.img }}" env: BUILD_AMD64: ${{ fromJSON('[0, 1]')[matrix.arch.name == 'amd64'] }} BUILD_ARM64: ${{ fromJSON('[0, 1]')[matrix.arch.name == 'arm64'] }} diff --git a/Makefile b/Makefile index 1ee4763..04783dd 100644 --- a/Makefile +++ b/Makefile @@ -146,15 +146,19 @@ endif push: $(foreach image, $(ALL_IMAGES), push_${image}) -push_%: tag_latest_% +push_%: FORCE ifeq ($(_build_amd64),1) docker push $(NAME)-$*:latest-amd64 +ifneq ($*,base) docker push $(NAME)-$*:$(VERSION)-amd64 endif +endif ifeq ($(_build_arm64),1) docker push $(NAME)-$*:latest-arm64 +ifneq ($*,base) docker push $(NAME)-$*:$(VERSION)-arm64 endif +endif release: $(foreach image, $(ALL_IMAGES), release_${image}) test -z "$$(git status --porcelain)" || git commit -am "$(VERSION)" && git tag "rel-$(VERSION)" && git push origin "rel-$(VERSION)"