From f2a9850481a061a765e5e71ca2569094ab7310d3 Mon Sep 17 00:00:00 2001 From: Gerrit Date: Thu, 16 Apr 2026 09:23:24 +0200 Subject: [PATCH 1/2] Update actions workflows and dependencies. --- .github/release-drafter.yml | 30 ------------- .github/workflows/build.yaml | 23 ++++++++++ .github/workflows/docker.yaml | 59 -------------------------- .github/workflows/release-drafter.yaml | 15 ------- CONTRIBUTING.md | 3 -- Dockerfile | 10 +---- go.mod | 2 +- 7 files changed, 26 insertions(+), 116 deletions(-) delete mode 100644 .github/release-drafter.yml create mode 100644 .github/workflows/build.yaml delete mode 100644 .github/workflows/docker.yaml delete mode 100644 .github/workflows/release-drafter.yaml delete mode 100644 CONTRIBUTING.md diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml deleted file mode 100644 index 59bc948..0000000 --- a/.github/release-drafter.yml +++ /dev/null @@ -1,30 +0,0 @@ -name-template: 'v$RESOLVED_VERSION' -tag-template: 'v$RESOLVED_VERSION' - -template: | - ## General Changes - - $CHANGES - -categories: -- title: '🚀 Features' - labels: - - 'feature' - - 'enhancement' -- title: '🐛 Bug Fixes' - labels: - - 'fix' - - 'bugfix' - - 'bug' - -version-resolver: - major: - labels: - - 'major' - minor: - labels: - - 'minor' - patch: - labels: - - 'patch' - default: patch diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..a9a18d8 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,23 @@ +--- +name: metal-stack component release + +on: + pull_request: + branches: + - master + release: + types: + - published + push: + branches: + - master + +jobs: + draft: + uses: metal-stack/actions-common/.github/workflows/release-drafter.yaml@v1 + + build: + uses: metal-stack/actions-common/.github/workflows/go-build.yaml@v1 + secrets: inherit + with: + build-command: make build diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml deleted file mode 100644 index 396af3b..0000000 --- a/.github/workflows/docker.yaml +++ /dev/null @@ -1,59 +0,0 @@ ---- -name: Docker Build Action -on: - pull_request: - branches: - - master - release: - types: - - published - push: - branches: - - master - -env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} - -jobs: - build: - name: Docker Build - runs-on: ubuntu-latest - - steps: - - name: Log in to the container registry - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ secrets.DOCKER_REGISTRY_USER }} - password: ${{ secrets.DOCKER_REGISTRY_TOKEN }} - - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up Go 1.24 - uses: actions/setup-go@v5 - with: - go-version: '1.24' - - - name: Lint - uses: golangci/golangci-lint-action@v7 - with: - args: --build-tags integration --timeout=3m - - - name: Make tag - run: | - [ "${GITHUB_EVENT_NAME}" == 'pull_request' ] && echo "tag=${GITHUB_HEAD_REF##*/}" >> $GITHUB_ENV || true - [ "${GITHUB_EVENT_NAME}" == 'release' ] && echo "tag=${GITHUB_REF##*/}" >> $GITHUB_ENV || true - [ "${GITHUB_EVENT_NAME}" == 'push' ] && echo "tag=latest" >> $GITHUB_ENV || true - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Build and push image - uses: docker/build-push-action@v6 - with: - context: . - push: true - sbom: true - tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.tag }} diff --git a/.github/workflows/release-drafter.yaml b/.github/workflows/release-drafter.yaml deleted file mode 100644 index da232f3..0000000 --- a/.github/workflows/release-drafter.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -name: Release Drafter Action - -on: - push: - branches: - - master - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: release-drafter/release-drafter@v5 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 63418fe..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,3 +0,0 @@ -# Contributing - -Please check out the [contributing section](https://docs.metal-stack.io/stable/development/contributing/) in our [docs](https://docs.metal-stack.io/). \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 8ae6eb8..ccd05c8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,3 @@ -FROM golang:1.24-bookworm AS builder - -WORKDIR /work -COPY . . -RUN make all - -FROM gcr.io/distroless/static-debian12 -COPY --from=builder /work/bin/metal-image-cache-sync /metal-image-cache-sync +FROM gcr.io/distroless/static-debian13 +COPY bin/metal-image-cache-sync /metal-image-cache-sync CMD ["/metal-image-cache-sync"] diff --git a/go.mod b/go.mod index a3b83ad..b9cc5b4 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/metal-stack/metal-image-cache-sync -go 1.24.0 +go 1.26 require ( github.com/Masterminds/semver/v3 v3.3.1 From c43044f5bb3a1fee319c5c0310b9ff30aa151f32 Mon Sep 17 00:00:00 2001 From: Gerrit Date: Thu, 16 Apr 2026 09:40:15 +0200 Subject: [PATCH 2/2] Job name. --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a9a18d8..4e063f6 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -16,7 +16,7 @@ jobs: draft: uses: metal-stack/actions-common/.github/workflows/release-drafter.yaml@v1 - build: + go-build: uses: metal-stack/actions-common/.github/workflows/go-build.yaml@v1 secrets: inherit with: