generated from mrz1836/go-template
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(BUX-449): change release flow to also build docker image
- Loading branch information
Damian Orzepowski
authored and
Damian Orzepowski
committed
Jan 11, 2024
1 parent
cb4e9f3
commit 742fc57
Showing
5 changed files
with
33 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,6 @@ node_modules/ | |
vendor/ | ||
|
||
# Binaries for programs and plugins | ||
dist/ | ||
gin-bin | ||
*.exe | ||
*.exe~ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,25 @@ | ||
# From: https://goreleaser.com/ci/actions/#usage | ||
name: release | ||
name: Release | ||
permissions: | ||
contents: write | ||
packages: write | ||
|
||
env: | ||
GO111MODULE: on | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
permissions: | ||
contents: write | ||
- 'v*' | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v5.0.0 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --rm-dist --debug | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | ||
- name: Syndicate to GoDocs | ||
run: make godocs | ||
release_default: | ||
uses: bactions/workflows/.github/workflows/release-go-server.yml@main | ||
with: | ||
version: ${{ github.ref_name }} | ||
os: linux | ||
go_main_file: cmd/server/main.go | ||
release_binaries: false | ||
secrets: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM --platform=$TARGETPLATFORM registry.access.redhat.com/ubi9-minimal | ||
|
||
# Set working directory | ||
WORKDIR /app | ||
|
||
ARG project_name | ||
ARG TARGETPLATFORM | ||
COPY ./dist/$TARGETPLATFORM . | ||
|
||
ARG version | ||
ARG tag | ||
ENV APP_BINARY=${project_name} | ||
ENV VERSION=${version:-develop} | ||
ENV TAG=${tag:-master} | ||
|
||
# Set entrypoint | ||
ENTRYPOINT ["./$APP_BINARY"] |