Skip to content

[skip-release] Update github-actions #123

[skip-release] Update github-actions

[skip-release] Update github-actions #123

name: build-push
on:
push:
workflow_dispatch:
jobs:
lint-test:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version-file: "go.mod"
- name: golangci-lint
uses: golangci/golangci-lint-action@82606bf257cbaff209d206a39f5134f0cfbfd2ee # v9
with:
version: latest
- name: Install dependencies
run: go get .
- run: go build
- name: unit test
run: go test -race -v ./...
- name: coverage
run: go test -v -coverprofile=coverage.out -covermode=atomic ./...
- name: upload coverage to codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v6
with:
files: ./coverage.out
fail_ci_if_error: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run:
needs: [lint-test]
uses: libops/.github/.github/workflows/build-push.yaml@d7f0ba06b4c8a1f8559892ea65a0b1af4d024dd3 # main
permissions:
contents: read
packages: write
secrets: inherit