From 793bfdfd5a787e6323b4e2f356c1b337d644548c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Lorenz?= Date: Mon, 28 Sep 2020 23:19:56 +1000 Subject: [PATCH] Use docker release command --- .github/workflow-templates/publish.yaml | 6 ++---- .github/workflows/auth-publish.yaml | 6 ++---- .github/workflows/migrate-publish.yaml | 6 ++---- .github/workflows/user-publish.yaml | 6 ++---- .github/workflows/web-publish.yaml | 6 ++---- Makefile | 2 +- 6 files changed, 11 insertions(+), 21 deletions(-) diff --git a/.github/workflow-templates/publish.yaml b/.github/workflow-templates/publish.yaml index 7d92dc75..dda77ec1 100644 --- a/.github/workflow-templates/publish.yaml +++ b/.github/workflow-templates/publish.yaml @@ -21,7 +21,5 @@ jobs: TAG: ${{steps.tmp.outputs.tag}} - name: Docker login run: docker login docker.pkg.github.com -u $GITHUB_ACTOR -p ${{ secrets.GITHUB_TOKEN }} - - name: Build image - run: make docker-build BIN=$IMAGE_NAME - - name: Publish image - run: make docker-publish BIN=$IMAGE_NAME REGISTRY=docker.pkg.github.com/$GITHUB_REPOSITORY VERSION=${{ steps.vars.outputs.tag }} + - name: Release images + run: make docker-release BIN=$IMAGE_NAME REGISTRY=docker.pkg.github.com/$GITHUB_REPOSITORY VERSION=${{ steps.vars.outputs.tag }} diff --git a/.github/workflows/auth-publish.yaml b/.github/workflows/auth-publish.yaml index 9ab30853..a266cfc3 100644 --- a/.github/workflows/auth-publish.yaml +++ b/.github/workflows/auth-publish.yaml @@ -21,7 +21,5 @@ jobs: TAG: ${{steps.tmp.outputs.tag}} - name: Docker login run: docker login docker.pkg.github.com -u $GITHUB_ACTOR -p ${{ secrets.GITHUB_TOKEN }} - - name: Build image - run: make docker-build BIN=$IMAGE_NAME - - name: Publish image - run: make docker-publish BIN=$IMAGE_NAME REGISTRY=docker.pkg.github.com/$GITHUB_REPOSITORY VERSION=${{ steps.vars.outputs.tag }} + - name: Release images + run: make docker-release BIN=$IMAGE_NAME REGISTRY=docker.pkg.github.com/$GITHUB_REPOSITORY VERSION=${{ steps.vars.outputs.tag }} diff --git a/.github/workflows/migrate-publish.yaml b/.github/workflows/migrate-publish.yaml index bcd917ea..47485d2a 100644 --- a/.github/workflows/migrate-publish.yaml +++ b/.github/workflows/migrate-publish.yaml @@ -21,7 +21,5 @@ jobs: TAG: ${{steps.tmp.outputs.tag}} - name: Docker login run: docker login docker.pkg.github.com -u $GITHUB_ACTOR -p ${{ secrets.GITHUB_TOKEN }} - - name: Build image - run: make docker-build BIN=$IMAGE_NAME - - name: Publish image - run: make docker-publish BIN=$IMAGE_NAME REGISTRY=docker.pkg.github.com/$GITHUB_REPOSITORY VERSION=${{ steps.vars.outputs.tag }} + - name: Release images + run: make docker-release BIN=$IMAGE_NAME REGISTRY=docker.pkg.github.com/$GITHUB_REPOSITORY VERSION=${{ steps.vars.outputs.tag }} diff --git a/.github/workflows/user-publish.yaml b/.github/workflows/user-publish.yaml index 33b72a8d..d188ecab 100644 --- a/.github/workflows/user-publish.yaml +++ b/.github/workflows/user-publish.yaml @@ -21,7 +21,5 @@ jobs: TAG: ${{steps.tmp.outputs.tag}} - name: Docker login run: docker login docker.pkg.github.com -u $GITHUB_ACTOR -p ${{ secrets.GITHUB_TOKEN }} - - name: Build image - run: make docker-build BIN=$IMAGE_NAME - - name: Publish image - run: make docker-publish BIN=$IMAGE_NAME REGISTRY=docker.pkg.github.com/$GITHUB_REPOSITORY VERSION=${{ steps.vars.outputs.tag }} + - name: Release images + run: make docker-release BIN=$IMAGE_NAME REGISTRY=docker.pkg.github.com/$GITHUB_REPOSITORY VERSION=${{ steps.vars.outputs.tag }} diff --git a/.github/workflows/web-publish.yaml b/.github/workflows/web-publish.yaml index 6daae4b5..af2ce322 100644 --- a/.github/workflows/web-publish.yaml +++ b/.github/workflows/web-publish.yaml @@ -21,7 +21,5 @@ jobs: TAG: ${{steps.tmp.outputs.tag}} - name: Docker login run: docker login docker.pkg.github.com -u $GITHUB_ACTOR -p ${{ secrets.GITHUB_TOKEN }} - - name: Build image - run: make docker-build BIN=$IMAGE_NAME - - name: Publish image - run: make docker-publish BIN=$IMAGE_NAME REGISTRY=docker.pkg.github.com/$GITHUB_REPOSITORY VERSION=${{ steps.vars.outputs.tag }} + - name: Release images + run: make docker-release BIN=$IMAGE_NAME REGISTRY=docker.pkg.github.com/$GITHUB_REPOSITORY VERSION=${{ steps.vars.outputs.tag }} diff --git a/Makefile b/Makefile index dcd753bd..9dfcefa8 100644 --- a/Makefile +++ b/Makefile @@ -43,7 +43,7 @@ docker-publish: docker-tag-latest docker-tag-version docker-publish-latest docke docker-publish-latest: @echo 'publish latest to $(REGISTRY)' - docker push $(REGISTRY)/$(BIN):latest + docker push $(REGISTRY)/go-api-boilerplate-$(BIN):latest docker-publish-version: @echo 'publish $(VERSION) to $(REGISTRY)'