Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit da887f4

Browse files
zugaoGabriel Saratura
authored and
Gabriel Saratura
committed
Update release process
1 parent 86dee17 commit da887f4

File tree

5 files changed

+24
-10
lines changed

5 files changed

+24
-10
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ jobs:
4040
username: ${{ github.repository_owner }}
4141
password: ${{ secrets.GITHUB_TOKEN }}
4242

43+
- name: Push docker image
44+
run: make docker-push -e IMG_TAG=${GITHUB_REF##*/}
45+
4346
- name: Build changelog from PRs with labels
4447
id: build_changelog
4548
uses: mikepenz/release-changelog-builder-action@v3
@@ -57,8 +60,7 @@ jobs:
5760
uses: goreleaser/goreleaser-action@v4
5861
with:
5962
args: release --release-notes .github/release-notes.md
60-
workdir: ./cmd/vshn-postgres-func
6163
env:
6264
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6365
REGISTRY: ghcr.io
64-
IMAGE_NAME: ${{ github.repository }}
66+
IMAGE_NAME: ${{ github.repository }}/vshn-postgres-func

.goreleaser.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
# This is an example goreleaser.yaml file with some sane defaults.
22
# Make sure to check the documentation at http://goreleaser.com
33
builds:
4-
- env:
5-
- CGO_ENABLED=0 # this is needed otherwise the Docker image build is faulty
4+
- id: vshn-postgres
5+
main: ./cmd/vshn-postgres-func
6+
dir: .
7+
binary: ./vshn-postgres-func
8+
env:
9+
- CGO_ENABLED=0 # this is needed otherwise the Docker image build is faulty
610
goarch:
7-
- amd64
8-
- arm64
11+
- amd64
12+
- arm64
913
goos:
10-
- linux
14+
- linux
1115
goarm:
12-
- "8"
16+
- "8"
1317

1418
archives:
1519
- format: binary
@@ -28,13 +32,17 @@ dockers:
2832
- "--platform=linux/amd64"
2933
image_templates:
3034
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:v{{ .Version }}-amd64"
35+
extra_files:
36+
- ../../.
3137

3238
- goarch: arm64
3339
use: buildx
3440
build_flag_templates:
3541
- "--platform=linux/arm64/v8"
3642
image_templates:
3743
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:v{{ .Version }}-arm64"
44+
extra_files:
45+
- ../../.
3846

3947
docker_manifests:
4048
## ghcr.io

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ARG INSTANCE=""
55
WORKDIR /app
66

77
COPY . ./
8-
RUN go mod download
8+
RUN echo $(ls -a) && go mod download
99

1010
RUN cd "cmd/$INSTANCE" && CGO_ENABLED=0 go build -o functionio .
1111

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ clean: recursive_target=.clean-build-img
8585
clean: $(instances)
8686
rm -rf docs/node_modules $(docs_out_dir) dist .cache $(WORK_DIR)
8787

88+
.PHONY: docker-push
89+
docker-push: build-docker ## Push docker image with the manager.
90+
docker push $(CONTAINER_IMG)
91+
8892
.PHONY: .clean-build-img
8993
.clean-build-img:
9094
docker rmi $(CONTAINER_IMG) -f || true

Makefile.vars.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ DOCKER_CMD ?= docker
2222
## BUILD:docker VSHN Postgres
2323
IMG_TAG ?= latest
2424
# Image URL to use all building/pushing image targets
25-
CONTAINER_IMG ?= ghcr.io/$(PROJECT_OWNER)/$(BIN_FILENAME):$(IMG_TAG)
25+
CONTAINER_IMG ?= ghcr.io/$(PROJECT_OWNER)/$(PROJECT_NAME)/$(BIN_FILENAME):$(IMG_TAG)
2626

2727

2828
## KIND:setup

0 commit comments

Comments
 (0)