Update according to path handling without rewrite #210
Workflow file for this run
This file contains 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: | |
push: | |
branches: | |
- '*' | |
paths-ignore: | |
- readme.md | |
- README.md | |
- CHANGELOG.md | |
pull_request: | |
branches: | |
- master | |
- develop | |
env: | |
GODIRS_NOVENDOR: '`go list ./... | grep -v /vendor/`' | |
PACKAGE_COMMONS: 'github.com/reportportal/commons-go/v5' | |
BINARY_DIR: 'bin' | |
BUILD_INFO_LDFLAGS: >- | |
-ldflags "-extldflags '"-static"' | |
-X ${PACKAGE_COMMONS}/commons.repo=${GITHUB_REPOSITORY} | |
-X ${PACKAGE_COMMONS}/commons.branch=${GITHUB_SHA} | |
-X ${PACKAGE_COMMONS}/commons.buildDate=${BUILD_DATE} | |
-X ${PACKAGE_COMMONS}/commons.version=${VERSION}" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get Date | |
id: date | |
run: 'echo "BUILD_DATE=`date +%FT%T%z`" >> $GITHUB_ENV' | |
- uses: actions/checkout@v4 | |
id: checkout | |
- name: Setup Go | |
id: setup | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
- name: Run golangci-lint | |
uses: golangci/golangci-lint-action@v4 | |
with: | |
version: 'v1.56' | |
args: | |
--timeout=10m | |
--fast | |
- name: Go Tests | |
id: tests | |
run: 'go test ${{ env.GODIRS_NOVENDOR }}' | |
- name: Go Build | |
id: build | |
env: | |
CGO_ENABLED: 0 | |
GOOS: linux | |
run: 'go build ${{ env.BUILD_INFO_LDFLAGS }} -o ${{ env.BINARY_DIR }}/service-index ./' |