diff --git a/.github/workflows/releases.yaml b/.github/workflows/releases.yaml index 9a8c395f..0d8f056b 100644 --- a/.github/workflows/releases.yaml +++ b/.github/workflows/releases.yaml @@ -23,7 +23,9 @@ jobs: env: USER: ${{ secrets.QUAY_USERNAME }} PASS: ${{ secrets.QUAY_PASSWORD }} - run: docker login -u "$USER" -p "$PASS" quay.io && make push + run: | + docker login -u "$USER" -p "$PASS" quay.io + make push && make latest - name: Compress Release Binary run: gzip ./faas - name: Create Release diff --git a/Makefile b/Makefile index a7717c26..77bb9c0d 100644 --- a/Makefile +++ b/Makefile @@ -17,21 +17,27 @@ test: go test -cover -coverprofile=coverage.out ./... image: Dockerfile - docker build -t $(REPO):$(VERS) \ + docker build -t $(REPO):latest \ + -t $(REPO):$(VERS) \ -t $(REPO):$(HASH) \ -t $(REPO):$(DATE)-$(VERS)-$(HASH) . -push: image - docker push $(REPO):$(VERS) - docker push $(REPO):$(HASH) - docker push $(REPO):$(DATE)-$(VERS)-$(HASH) - release: build test go get -u github.com/git-chglog/git-chglog/cmd/git-chglog git-chglog --next-tag $(VTAG) -o CHANGELOG.md git commit -am "release: $(VTAG)" git tag $(VTAG) +push: image + docker push $(REPO):$(VERS) + docker push $(REPO):$(HASH) + docker push $(REPO):$(DATE)-$(VERS)-$(HASH) + +latest: + # push the local 'latest' tag as the new public latest version + # (run by CI only for releases) + docker push $(REPO):latest + clean: -@rm -f $(BIN) -@rm -f coverage.out