1
0
mirror of https://github.com/helm/chart-releaser.git synced 2026-02-05 09:45:23 +01:00
Files
chart-releaser/.github/workflows/ci.yaml
Carlos Tadeu Panato Junior 2d923ecd8a Add command docs and job to check it (#211)
* add command docs

Signed-off-by: cpanato <ctadeu@gmail.com>

* add job to check command doc

Signed-off-by: cpanato <ctadeu@gmail.com>

* avoid dynamic docs and expand the path later

Signed-off-by: cpanato <ctadeu@gmail.com>

Signed-off-by: cpanato <ctadeu@gmail.com>
2022-09-19 10:16:08 +02:00

106 lines
2.6 KiB
YAML

name: CI
on:
pull_request:
push:
branches:
- main
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version-file: './go.mod'
check-latest: true
- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Install GoReleaser
uses: goreleaser/goreleaser-action@v3.1.0
with:
install-only: true
- name: Install cosign
uses: sigstore/cosign-installer@v2.6.0
- name: Install syft
uses: anchore/sbom-action/download-syft@v0.12.0
- name: Cache
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- uses: chainguard-dev/actions/goimports@main
- name: Run Mage
uses: magefile/mage-action@v2
with:
version: v1.13.0
args: -v ci
check-docs:
name: check-docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
- uses: actions/setup-go@84cbf8094393cdc5fe1fe1671ff2647332956b1a # v3
with:
go-version-file: './go.mod'
check-latest: true
- name: generate docs
run: |
go build -o cr-bin ./cr/main.go
./cr-bin doc-gen
git_status="$(git status --porcelain)"
if [[ ${git_status} ]]; then
echo -e 'Documentation is outdated. Please update the docs\n'
echo "${git_status}"
exit 1
fi
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version-file: './go.mod'
check-latest: true
- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.48.0