Skip to content

golang: Build 1.25.0 images - take #2 (copy golang binaries from golang alpine image) #843

golang: Build 1.25.0 images - take #2 (copy golang binaries from golang alpine image)

golang: Build 1.25.0 images - take #2 (copy golang binaries from golang alpine image) #843

Workflow file for this run

---
name: test-snapshot-release
on:
pull_request:
branches:
- master
permissions: {}
jobs:
snapshot:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Harden Runner
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
disable-sudo: true
egress-policy: audit
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v3.5.2
with:
fetch-depth: 1
persist-credentials: false
- name: Set up Go
id: go
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
with:
go-version: '1.24'
check-latest: true
- name: Install bom
uses: kubernetes-sigs/release-actions/setup-bom@a30d93cf2aa029e1e4c8a6c79f766aebf429fddb # v0.3.1
- name: Test release build
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
with:
args: release --clean --snapshot --skip=sign
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: check binary
run: |
./dist/krel-amd64-linux version
./dist/publish-release-amd64-linux help
./dist/release-notes-amd64-linux version
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: artifacts
path: dist/*
attestation:
runs-on: ubuntu-latest
permissions:
contents: read
needs:
- snapshot
steps:
- name: Harden Runner
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
disable-sudo: true
egress-policy: audit
- name: Check out code onto GOPATH
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 1
persist-credentials: false
- name: Install tejolote
uses: kubernetes-sigs/release-actions/setup-tejolote@a30d93cf2aa029e1e4c8a6c79f766aebf429fddb # v0.3.1
- run: |
tejolote attest github://kubernetes/release/"${GITHUB_RUN_ID}" --output release.intoto.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: release.intoto.json
path: ./release.intoto.json