Skip to content
Draft
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
5 changes: 3 additions & 2 deletions .goreleaser.yml → .config/goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
version: 2
project_name: kured
before:
hooks:
Expand All @@ -23,10 +24,10 @@ builds:
- -trimpath

snapshot:
name_template: "{{ .ShortCommit }}"
version_template: "{{ .ShortCommit }}"

release:
disable: true

changelog:
skip: true
disable: true
2 changes: 1 addition & 1 deletion .mise/config.toml → .config/mise.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tools]
cosign = "2.2.3"
golangci-lint = "2.1.6"
goreleaser = "1.24.0"
goreleaser = "2.13.1"
kind = "0.30.0"
kubectl = "1.31.0"
shellcheck = "0.11.0"
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/on-pr-goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Verify GoReleaser config
on:
pull_request:
paths:
- '.config/goreleaser.yaml'
push:
paths:
- '.config/goreleaser.yaml'

jobs:
check-goreleaser-config:
name: Check GoReleaser config
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
with:
egress-policy: audit

- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

- name: Check GoReleaser config
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a #v6.4.0
with:
version: '~> v2'
args: check
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Your system needs at least the following binaries installed:
### Fetch the additional binaries required

Please run `make install-tools` once on a fresh repository clone to download necessary developer tools.
Installed tools are listed in [.mise directory](.mise/config.toml).
Installed tools are listed in [.mise directory](.config/mise.toml).

### Configure your git for the "Certificate of Origin"

Expand Down Expand Up @@ -94,7 +94,7 @@ We also have other tests:

All these tests are run on every PR/tagged release. See [.github/workflows](.github/workflows) for more details.

We use [GoReleaser to build](.goreleaser.yml).
We use [GoReleaser to build](.config/goreleaser.yaml).

## Regular development activities / maintenance

Expand Down
13 changes: 7 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,21 @@ ARG TARGETOS
ARG TARGETARCH
ARG TARGETVARIANT

RUN apk update --no-cache && apk add --no-cache jq

COPY dist/ /dist

# Fetch binary directory from artifacts.json
RUN set -ex \
&& case "${TARGETARCH}" in \
amd64) \
SUFFIX="_v1" \
;; \
arm) \
SUFFIX="_${TARGETVARIANT:1}" \
BINARY_PATH=$(jq -r 'first(.[] | select(.goos == "linux" and .type == "Binary" and .goarch == "arm" and .goarm == env.TARGETVARIANT[1:] ) | .path)' /dist/artifacts.json) \
;; \
*) \
SUFFIX="" \
BINARY_PATH=$(jq -r 'first(.[] | select(.goos == "linux" and .type == "Binary" and .goarch == env.TARGETARCH) | .path)' /dist/artifacts.json) \
;; \
esac \
&& cp /dist/kured_${TARGETOS}_${TARGETARCH}${SUFFIX}/kured /dist/kured;
&& cp /${BINARY_PATH} /dist/kured;

FROM alpine:3.22.2@sha256:4b7ce07002c69e8f3d704a9c5d6fd3053be500b7f1c69fc0d80990c2ad8dd412
RUN apk update --no-cache && apk upgrade --no-cache && apk add --no-cache ca-certificates tzdata
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,8 @@ lint:

lint-docs:
@echo "Running lychee"
mise x lychee@latest -- lychee --verbose --no-progress '*.md' '*.yaml' '*/*/*.go' --exclude-link-local
mise x lychee@latest -- lychee --verbose --no-progress '*.md' '*.yaml' '*/*/*.go' --exclude-link-local

lint-goreleaser:
@echo "Checking goreleaser"
goreleaser check