mirror of
https://github.com/helm/chart-testing.git
synced 2026-02-05 09:45:14 +01:00
86 lines
2.3 KiB
YAML
86 lines
2.3 KiB
YAML
name: release
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: Version
|
|
required: true
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
id-token: write
|
|
contents: write
|
|
|
|
steps:
|
|
|
|
- name: checkout
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: shellcheck
|
|
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # v2.0.0
|
|
|
|
- name: Setup go
|
|
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
|
|
with:
|
|
go-version-file: './go.mod'
|
|
check-latest: true
|
|
|
|
- name: Install GoReleaser
|
|
uses: goreleaser/goreleaser-action@90a3faa9d0182683851fbfa97ca1a2cb983bfca3 # v6.2.1
|
|
with:
|
|
install-only: true
|
|
|
|
- name: Install cosign
|
|
uses: sigstore/cosign-installer@d7d6bc7722e3daa8354c50bcb52f4837da5e9b6a # v3.8.1
|
|
|
|
- name: Install syft
|
|
uses: anchore/sbom-action/download-syft@f325610c9f50a54015d37c8d16cb3b0e2c8f4de0 # v0.18.0
|
|
|
|
- name: Install tools
|
|
run: |
|
|
./setup.sh
|
|
|
|
- name: Lint
|
|
run: |
|
|
go vet -v ./...
|
|
goimports -w -l .
|
|
go mod tidy
|
|
git diff --exit-code
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@4574d27a4764455b42196d70a065bc6853246a25 # v3.4.0
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@f7ce87c1d6bead3e36075b2ce75da1f6cc28aaca # v3.9.0
|
|
|
|
- name: Login to registry
|
|
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
|
|
with:
|
|
registry: quay.io
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
- name: Tag
|
|
run: |
|
|
git config user.name "$GITHUB_ACTOR"
|
|
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
|
|
|
|
tag='${{ github.event.inputs.version }}'
|
|
git tag --annotate --message "Tag for release $tag" "$tag"
|
|
git push origin "refs/tags/$tag"
|
|
|
|
- name: Build
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
set -o nounset
|
|
set -o pipefail
|
|
|
|
echo "Building release ${{ github.event.inputs.version }}"
|
|
./build.sh --release
|