chore(deps): update goreleaser/goreleaser docker tag to v2.15.4 #59
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | ||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| workflow_dispatch: {} | ||
| env: | ||
| CGO_ENABLED: "0" | ||
| GOFLAGS: -trimpath | ||
| jobs: | ||
| lint-go: | ||
| if: ${{ github.event.pull_request.number }} | ||
| continue-on-error: true | ||
| container: | ||
| image: golangci/golangci-lint:v2.11.3-alpine | ||
| options: --entrypoint "" | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - name: Cache dependencies | ||
| uses: actions/cache@v5 | ||
| with: | ||
| key: go-mod | ||
| path: /go/pkg/mod | ||
| - name: Run | ||
| run: golangci-lint run --timeout 5m ./... | ||
| runs-on: ubuntu-latest | ||
| vulncheck: | ||
| continue-on-error: true | ||
| container: | ||
| image: golang:1.26 | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - name: Cache dependencies | ||
| uses: actions/cache@v5 | ||
| with: | ||
| key: go-mod | ||
| path: /go/pkg/mod | ||
| - name: Run | ||
| run: |- | ||
| go install golang.org/x/vuln/cmd/govulncheck@latest | ||
| govulncheck ./... | ||
| runs-on: ubuntu-latest | ||
| if: ${{ github.event.pull_request.number }} | ||
| unit-tests: | ||
| runs-on: ubuntu-latest | ||
| needs: | ||
| - lint-go | ||
| - vulncheck | ||
| container: | ||
| image: golang:1.26 | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - name: Cache dependencies | ||
| uses: actions/cache@v5 | ||
| with: | ||
| key: go-mod | ||
| path: /go/pkg/mod | ||
| - name: Run | ||
| run: go test -v -cover -coverprofile=coverage.out -covermode=atomic ./... | ||
| - if: always() | ||
| name: Upload artifacts | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: unit-tests-artifacts | ||
| path: coverage.out | ||
| gen-version: | ||
| runs-on: ubuntu-latest | ||
| needs: | ||
| - unit-tests | ||
| outputs: | ||
| version: ${{ steps.outputs.outputs.version }} | ||
| container: | ||
| image: golang:1.26 | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: "0" | ||
| - name: Mark workspace as safe directory | ||
| run: git config --global --add safe.directory ${GITHUB_WORKSPACE} | ||
| - name: Cache dependencies | ||
| uses: actions/cache@v5 | ||
| with: | ||
| key: go-mod | ||
| path: /go/pkg/mod | ||
| - name: Run | ||
| run: echo "VERSION=$(git describe --tags --always)" > version.env | ||
| - id: outputs | ||
| name: Set outputs | ||
| run: cat version.env >> $GITHUB_OUTPUT | ||
| build-binary: | ||
| runs-on: ubuntu-latest | ||
| needs: | ||
| - gen-version | ||
| container: | ||
| image: golang:1.26 | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - name: Cache dependencies | ||
| uses: actions/cache@v5 | ||
| with: | ||
| key: go-mod | ||
| path: /go/pkg/mod | ||
| - name: Run | ||
| run: 'echo "Version is: "${{ needs.gen-version.outputs.version }}' | ||
| - name: Run | ||
| run: go build -buildvcs=false -ldflags "-s -w -X main.pisynVersion=${{ needs.gen-version.outputs.version }}" -o bin/pisyn ./cmd/pisyn | ||
| - if: always() | ||
| name: Upload artifacts | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: build-binary-artifacts | ||
| path: bin/ | ||
| runs-on: ubuntu-latest | ||