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

Commit

Permalink
Update release process
Browse files Browse the repository at this point in the history
  • Loading branch information
zugao authored and Gabriel Saratura committed Apr 6, 2023
1 parent 86dee17 commit 003dcb8
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push docker image
run: make docker-push -e IMG_TAG=${GITHUB_REF##*/}

- name: Build changelog from PRs with labels
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v3
Expand All @@ -57,8 +60,7 @@ jobs:
uses: goreleaser/goreleaser-action@v4
with:
args: release --release-notes .github/release-notes.md
workdir: ./cmd/vshn-postgres-func
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
IMAGE_NAME: ${{ github.repository }}/vshn-postgres-func
4 changes: 3 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
builds:
- env:
- id: vshn-postgres
main: ./cmd/vshn-postgres-func
env:
- CGO_ENABLED=0 # this is needed otherwise the Docker image build is faulty
goarch:
- amd64
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ARG INSTANCE=""
WORKDIR /app

COPY . ./
RUN go mod download
RUN echo $(ls -a) && go mod download

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

Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ clean: recursive_target=.clean-build-img
clean: $(instances)
rm -rf docs/node_modules $(docs_out_dir) dist .cache $(WORK_DIR)

.PHONY: docker-push
docker-push: build-docker ## Push docker image with the manager.
docker push $(CONTAINER_IMG)

.PHONY: .clean-build-img
.clean-build-img:
docker rmi $(CONTAINER_IMG) -f || true
Expand Down
2 changes: 1 addition & 1 deletion Makefile.vars.mk
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ DOCKER_CMD ?= docker
## BUILD:docker VSHN Postgres
IMG_TAG ?= latest
# Image URL to use all building/pushing image targets
CONTAINER_IMG ?= ghcr.io/$(PROJECT_OWNER)/$(BIN_FILENAME):$(IMG_TAG)
CONTAINER_IMG ?= ghcr.io/$(PROJECT_OWNER)/$(PROJECT_NAME)/$(BIN_FILENAME):$(IMG_TAG)


## KIND:setup
Expand Down

0 comments on commit 003dcb8

Please sign in to comment.