Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Goreleaser #9

Merged
merged 9 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,23 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build and Push Docker Images
run: make docker-buildx GIT_TAG=${{ github.event.release.tag_name }}
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
KO_DOCKER_REPO: ghcr.io/${{ github.repository }}
#- name: Build and Push Docker Images
# run: make docker-buildx GIT_TAG=${{ github.event.release.tag_name }}
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push OLM Bundle Image
run: make bundle bundle-build bundle-push GIT_TAG=${{ github.event.release.tag_name }}
env:
Expand Down
28 changes: 18 additions & 10 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ before:
# - go test ./...

builds:
- env:
- skip: true
env:
- CGO_ENABLED=0
main: ./cmd
binary: istio-fortsa
binary: manager
flags:
- -trimpath
ldflags:
Expand All @@ -22,10 +23,17 @@ builds:
- linux
goarch:
- amd64
- arm64

release:
github:
owner: hercynium
name: istio-fortsa

kos:
- base_image: gcr.io/distroless/static:nonroot
repository: ghcr.io/{{ .Env.GITHUB_REPOSITORY }}
repository: ghcr.io/hercynium/istio-fortsa
main: ./cmd
tags:
- "{{ .Tag }}"
- latest
Expand Down Expand Up @@ -55,14 +63,14 @@ kos:
org.opencontainers.image.source: "{{ .Env.GITHUB_SERVER_URL }}/{{ .Env.GITHUB_REPOSITORY }}"


release:
skip_upload: true
footer: |
# Container images
# release:
# skip_upload: true
# footer: |
# # Container images

```
ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:{{ .Tag }}
```
# ```
# ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:{{ .Tag }}
# ```

changelog:
sort: asc
Expand Down