mirror of
https://github.com/helm/chart-testing.git
synced 2026-02-05 09:45:14 +01:00
74 lines
1.9 KiB
YAML
74 lines
1.9 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@a12a3943b4bdde767164f792f33f40b04645d846 # v2.4.0
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: shellcheck
|
|
uses: ludeeus/action-shellcheck@94e0aab03ca135d11a35e5bfc14e6746dc56e7e9 # v1.1.0
|
|
|
|
- name: Setup go
|
|
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v2.2.0
|
|
with:
|
|
go-version: 1.17.x
|
|
|
|
- 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@27d0a4f181a40b142cce983c5393082c365d1480 # v1.2.0
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@94ab11c41e45d028884a99163086648e898eed25 # v1.6.0
|
|
|
|
- name: Login to registry
|
|
uses: docker/login-action@dd4fa0671be5250ee6f50aedf4cb05514abda2c7 # v1.14.1
|
|
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
|