Skip to content

fix: update manager metrics ip (#352) #33

fix: update manager metrics ip (#352)

fix: update manager metrics ip (#352) #33

Workflow file for this run

# Reference from:
# https://goreleaser.com/ci/actions/
name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
env:
GO_VERSION: '1.24'
jobs:
Test:
name: Unit Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Fetch History
run: git fetch --prune --unshallow
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Cache Go Dependencies
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-
- name: Update Go Modules
run: |
go mod tidy
go mod download
- name: Run Unit Tests
run: |
make test
git status
- name: Check diff
run: '[[ -z $(git status -s) ]] || (printf "Existing modified/untracked files.\nPlease run \"make manifests fmt vet\" and push again.\n"; exit 1)'
GolangLint:
name: Golang Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
cache-dependency-path: "**/*.sum"
- name: golangci-lint
uses: golangci/golangci-lint-action@v7
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v2.0.2
args: --timeout=30m
# Release the artifacts, release note and images.
Release:
runs-on: ubuntu-latest
needs: [Test, GolangLint]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Check if on tag
run: |
if [[ "${GITHUB_REF#refs/tags/}" != "$GITHUB_REF" ]]; then
echo "Running on tag ${GITHUB_REF#refs/tags/}"
else
echo "Not running on a tag"
fi
- name: Get version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.24
- name: Release with GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}