generated from cybozu-go/neco-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from cybozu-go/improve-release-workflow
Improve release workflow
- Loading branch information
Showing
11 changed files
with
180 additions
and
165 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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: "Setup tools" | ||
description: "Setup tools with aqua" | ||
inputs: | ||
github_token: | ||
description: "GitHub Token" | ||
required: true | ||
runs: | ||
using: composite | ||
steps: | ||
- uses: aquaproj/aqua-installer@36dc5833b04eb63f06e3bb818aa6b7a6e6db99a9 # v2.1.2 | ||
with: | ||
aqua_version: v2.9.0 | ||
env: | ||
GITHUB_TOKEN: ${{ inputs.github_token }} |
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,30 @@ | ||
changelog: | ||
exclude: | ||
labels: | ||
- ignore-for-release | ||
- ci | ||
- documentation | ||
- refactoring | ||
- test | ||
categories: | ||
- title: Features | ||
labels: | ||
- enhancement | ||
- title: Bug Fixes | ||
labels: | ||
- bug | ||
- title: Deprecated | ||
labels: | ||
- deprecate | ||
- title: Removed | ||
labels: | ||
- remove | ||
- title: Security | ||
labels: | ||
- security | ||
- title: Dependencies | ||
labels: | ||
- dependencies | ||
- title: Others | ||
labels: | ||
- "*" |
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
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,48 @@ | ||
project_name: pod-security-admission | ||
dist: bin/ | ||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
main: ./cmd | ||
binary: pod-security-admission | ||
goos: | ||
- linux | ||
goarch: | ||
- amd64 | ||
ldflags: | ||
- -X github.com/cybozu-go/pod-security-admission.Version={{.Version}} | ||
archives: | ||
- files: | ||
- install.yaml | ||
dockers: | ||
- image_templates: | ||
- "quay.io/cybozu/{{.ProjectName}}:{{ .Version }}-amd64" | ||
- "ghcr.io/cybozu-go/{{.ProjectName}}:{{ .Version }}-amd64" | ||
use: buildx | ||
dockerfile: Dockerfile | ||
extra_files: | ||
- LICENSE | ||
build_flag_templates: | ||
- "--platform=linux/amd64" | ||
- "--label=org.opencontainers.image.created={{.Date}}" | ||
- "--label=org.opencontainers.image.revision={{.FullCommit}}" | ||
- "--label=org.opencontainers.image.version={{.Version}}" | ||
docker_manifests: | ||
- name_template: "quay.io/cybozu/{{.ProjectName}}:{{ .Version }}" | ||
image_templates: | ||
- "quay.io/cybozu/{{.ProjectName}}:{{ .Version }}-amd64" | ||
- name_template: "quay.io/cybozu/{{.ProjectName}}:{{ .Major }}.{{ .Minor }}" | ||
image_templates: | ||
- "quay.io/cybozu/{{.ProjectName}}:{{ .Version }}-amd64" | ||
- name_template: "ghcr.io/cybozu-go/{{.ProjectName}}:{{ .Version }}" | ||
image_templates: | ||
- "ghcr.io/cybozu-go/{{.ProjectName}}:{{ .Version }}-amd64" | ||
- name_template: "ghcr.io/cybozu-go/{{.ProjectName}}:{{ .Major }}.{{ .Minor }}" | ||
image_templates: | ||
- "ghcr.io/cybozu-go/{{.ProjectName}}:{{ .Version }}-amd64" | ||
checksum: | ||
name_template: 'checksums.txt' | ||
snapshot: | ||
name_template: "{{ .Tag }}-next" | ||
changelog: | ||
use: github-native |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,9 @@ | ||
# Build the manager binary | ||
FROM quay.io/cybozu/golang:1.20-jammy as builder | ||
|
||
WORKDIR /workspace | ||
# Copy the Go Modules manifests | ||
COPY go.mod go.mod | ||
COPY go.sum go.sum | ||
# cache deps before building and copying source so that we don't need to re-download as much | ||
# and so that source changes don't invalidate our downloaded layer | ||
RUN go mod download | ||
|
||
# Copy the go source | ||
COPY version.go version.go | ||
COPY cmd/ cmd/ | ||
COPY hooks/ hooks/ | ||
|
||
# Build | ||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o pod-security-admission cmd/main.go | ||
|
||
FROM scratch | ||
LABEL org.opencontainers.image.authors="Cybozu, Inc." \ | ||
org.opencontainers.image.title="pod-security-admission" \ | ||
org.opencontainers.image.source="https://github.com/cybozu-go/pod-security-admission" | ||
WORKDIR / | ||
COPY --from=builder /workspace/pod-security-admission . | ||
COPY pod-security-admission / | ||
USER 10000:10000 | ||
|
||
ENTRYPOINT ["/pod-security-admission"] |
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
Oops, something went wrong.