Skip to content

init cert-manager-alidns-webhook #2

init cert-manager-alidns-webhook

init cert-manager-alidns-webhook #2

Workflow file for this run

name: CI
on:
push:
branches:
- master
tags:
- "v*.*.*"
pull_request:
branches:
- master
permissions:
contents: read
packages: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.25"
cache: true
- name: Run go vet
run: go vet ./...
- name: Run tests
run: go test -race -coverprofile=coverage.txt -covermode=atomic ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: ./coverage.txt
fail_ci_if_error: false
verbose: true
helm-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Helm
uses: azure/setup-helm@v4
with:
version: v3.16.0
- name: Lint Helm Chart
run: |
helm lint deploy/cert-manager-alidns-webhook
docker-release:
if: startsWith(github.ref, 'refs/tags/v')
needs: [test, helm-lint]
uses: ./.github/workflows/docker-release.yaml
secrets: inherit
permissions:
contents: write
packages: write
id-token: write
helm-release:
if: startsWith(github.ref, 'refs/tags/v')
needs: [test, helm-lint]
uses: ./.github/workflows/helm-release.yaml
secrets: inherit
permissions:
contents: write
packages: write
id-token: write
create-release:
if: startsWith(github.ref, 'refs/tags/v')
needs: [docker-release, helm-release]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
body: |
## Docker Image
```bash
docker pull ghcr.io/crazygit/cert-manager-alidns-webhook:${{ github.ref_name }}
```
## Helm Chart
```bash
helm install cert-manager-alidns-webhook oci://ghcr.io/crazygit/helm-charts/cert-manager-alidns-webhook --version ${{ github.ref_name }}
```
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}