Skip to content

Commit ac34447

Browse files
committed
Ue makefile command
1 parent 48c6364 commit ac34447

File tree

6 files changed

+9
-29
lines changed

6 files changed

+9
-29
lines changed

.github/workflow-templates/publish.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,5 @@ jobs:
2323
run: docker login docker.pkg.github.com -u $GITHUB_ACTOR -p ${{ secrets.GITHUB_TOKEN }}
2424
- name: Build image
2525
run: make docker-build BIN=$IMAGE_NAME
26-
- name: Tag image
27-
run: make docker-tag BIN=$IMAGE_NAME REGISTRY=docker.pkg.github.com/$GITHUB_REPOSITORY VERSION=${{ steps.vars.outputs.tag }}
2826
- name: Publish image
29-
run: |
30-
docker push "docker.pkg.github.com/$GITHUB_REPOSITORY/$GITHUB_REPOSITORY-$IMAGE_NAME:latest"
31-
docker push "docker.pkg.github.com/$GITHUB_REPOSITORY/$GITHUB_REPOSITORY-$IMAGE_NAME:${{ steps.vars.outputs.tag }}"
27+
run: make docker-publish BIN=$IMAGE_NAME REGISTRY=docker.pkg.github.com/$GITHUB_REPOSITORY VERSION=${{ steps.vars.outputs.tag }}

.github/workflows/auth-publish.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,5 @@ jobs:
2323
run: docker login docker.pkg.github.com -u $GITHUB_ACTOR -p ${{ secrets.GITHUB_TOKEN }}
2424
- name: Build image
2525
run: make docker-build BIN=$IMAGE_NAME
26-
- name: Tag image
27-
run: make docker-tag BIN=$IMAGE_NAME REGISTRY=docker.pkg.github.com/$GITHUB_REPOSITORY VERSION=${{ steps.vars.outputs.tag }}
2826
- name: Publish image
29-
run: |
30-
docker push "docker.pkg.github.com/$GITHUB_REPOSITORY/$GITHUB_REPOSITORY-$IMAGE_NAME:latest"
31-
docker push "docker.pkg.github.com/$GITHUB_REPOSITORY/$GITHUB_REPOSITORY-$IMAGE_NAME:${{ steps.vars.outputs.tag }}"
27+
run: make docker-publish BIN=$IMAGE_NAME REGISTRY=docker.pkg.github.com/$GITHUB_REPOSITORY VERSION=${{ steps.vars.outputs.tag }}

.github/workflows/migrate-publish.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,5 @@ jobs:
2323
run: docker login docker.pkg.github.com -u $GITHUB_ACTOR -p ${{ secrets.GITHUB_TOKEN }}
2424
- name: Build image
2525
run: make docker-build BIN=$IMAGE_NAME
26-
- name: Tag image
27-
run: make docker-tag BIN=$IMAGE_NAME REGISTRY=docker.pkg.github.com/$GITHUB_REPOSITORY VERSION=${{ steps.vars.outputs.tag }}
2826
- name: Publish image
29-
run: |
30-
docker push "docker.pkg.github.com/$GITHUB_REPOSITORY/$GITHUB_REPOSITORY-$IMAGE_NAME:latest"
31-
docker push "docker.pkg.github.com/$GITHUB_REPOSITORY/$GITHUB_REPOSITORY-$IMAGE_NAME:${{ steps.vars.outputs.tag }}"
27+
run: make docker-publish BIN=$IMAGE_NAME REGISTRY=docker.pkg.github.com/$GITHUB_REPOSITORY VERSION=${{ steps.vars.outputs.tag }}

.github/workflows/user-publish.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,5 @@ jobs:
2323
run: docker login docker.pkg.github.com -u $GITHUB_ACTOR -p ${{ secrets.GITHUB_TOKEN }}
2424
- name: Build image
2525
run: make docker-build BIN=$IMAGE_NAME
26-
- name: Tag image
27-
run: make docker-tag BIN=$IMAGE_NAME REGISTRY=docker.pkg.github.com/$GITHUB_REPOSITORY VERSION=${{ steps.vars.outputs.tag }}
2826
- name: Publish image
29-
run: |
30-
docker push "docker.pkg.github.com/$GITHUB_REPOSITORY/$GITHUB_REPOSITORY-$IMAGE_NAME:latest"
31-
docker push "docker.pkg.github.com/$GITHUB_REPOSITORY/$GITHUB_REPOSITORY-$IMAGE_NAME:${{ steps.vars.outputs.tag }}"
27+
run: make docker-publish BIN=$IMAGE_NAME REGISTRY=docker.pkg.github.com/$GITHUB_REPOSITORY VERSION=${{ steps.vars.outputs.tag }}

.github/workflows/web-publish.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,5 @@ jobs:
2323
run: docker login docker.pkg.github.com -u $GITHUB_ACTOR -p ${{ secrets.GITHUB_TOKEN }}
2424
- name: Build image
2525
run: make docker-build BIN=$IMAGE_NAME
26-
- name: Tag image
27-
run: make docker-tag BIN=$IMAGE_NAME REGISTRY=docker.pkg.github.com/$GITHUB_REPOSITORY VERSION=${{ steps.vars.outputs.tag }}
2826
- name: Publish image
29-
run: |
30-
docker push "docker.pkg.github.com/$GITHUB_REPOSITORY/$GITHUB_REPOSITORY-$IMAGE_NAME:latest"
31-
docker push "docker.pkg.github.com/$GITHUB_REPOSITORY/$GITHUB_REPOSITORY-$IMAGE_NAME:${{ steps.vars.outputs.tag }}"
27+
run: make docker-publish BIN=$IMAGE_NAME REGISTRY=docker.pkg.github.com/$GITHUB_REPOSITORY VERSION=${{ steps.vars.outputs.tag }}

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,25 +39,25 @@ docker-stop: ## [DOCKER] Stop docker container. Example: `make docker-stop BIN=u
3939
docker-rm: docker-stop ## [DOCKER] Stop and then remove docker container. Example: `make docker-rm BIN=user`
4040
docker rm go-api-boilerplate-$(BIN)
4141

42-
docker-publish: aws-repo-login docker-publish-latest docker-publish-version ## [DOCKER] Docker publish. Example: `make docker-publish BIN=user REGISTRY=https://your-registry.com`
42+
docker-publish: docker-publish-latest docker-publish-version ## [DOCKER] Docker publish. Example: `make docker-publish BIN=user REGISTRY=https://your-registry.com`
4343

4444
docker-publish-latest: docker-tag-latest
4545
@echo 'publish latest to $(REGISTRY)'
4646
docker push $(REGISTRY)/$(BIN):latest
4747

4848
docker-publish-version: docker-tag-version
4949
@echo 'publish $(VERSION) to $(REGISTRY)'
50-
docker push $(REGISTRY)/$(BIN):$(VERSION)
50+
docker push $(REGISTRY)/go-api-boilerplate-$(BIN):$(VERSION)
5151

5252
docker-tag: docker-tag-latest docker-tag-version ## [DOCKER] Tag current container. Example: `make docker-tag BIN=user REGISTRY=https://your-registry.com`
5353

5454
docker-tag-latest:
5555
@echo 'create tag latest'
56-
docker tag go-api-boilerplate-$(BIN) $(REGISTRY)/$(BIN):latest
56+
docker tag go-api-boilerplate-$(BIN) $(REGISTRY)/go-api-boilerplate-$(BIN):latest
5757

5858
docker-tag-version:
5959
@echo 'create tag $(VERSION)'
60-
docker tag go-api-boilerplate-$(BIN) $(REGISTRY)/$(BIN):$(VERSION)
60+
docker tag go-api-boilerplate-$(BIN) $(REGISTRY)/go-api-boilerplate-$(BIN):$(VERSION)
6161

6262
docker-release: docker-build docker-publish ## [DOCKER] Docker release - build, tag and push the container. Example: `make docker-release BIN=user REGISTRY=https://your-registry.com`
6363

0 commit comments

Comments
 (0)