mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2026-10-18 13:18:26 +02:00
chore(build): retrieve go version from go.mod as single point of truth
This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
name: Continuous Integration
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
COVER: true
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
id: go
|
||||
|
||||
- name: Get dependencies
|
||||
env:
|
||||
# renovate: datasource=github-tags depName=golangci/golangci-lint
|
||||
GOLANGCI_LINT_VERSION: v1.63.4
|
||||
run: |
|
||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ${GOLANGCI_LINT_VERSION}
|
||||
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
||||
chmod +x ./cc-test-reporter
|
||||
|
||||
- name: Verify Code Generation
|
||||
run: |
|
||||
make verify-generate
|
||||
|
||||
- name: Lint
|
||||
run: |
|
||||
make lint
|
||||
|
||||
- name: Build
|
||||
if: (!startsWith(github.head_ref, 'release'))
|
||||
run: |
|
||||
make build
|
||||
|
||||
# For release testing
|
||||
- name: Build All
|
||||
if: github.base_ref == 'master' && startsWith(github.head_ref, 'release')
|
||||
run: |
|
||||
make release
|
||||
|
||||
- name: Test
|
||||
env:
|
||||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
||||
run: |
|
||||
./.github/workflows/test.sh
|
||||
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Docker Build
|
||||
if: (!startsWith(github.head_ref, 'release'))
|
||||
run: |
|
||||
make docker
|
||||
|
||||
# For release testing
|
||||
- name: Docker Build All
|
||||
if: github.base_ref == 'master' && startsWith(github.head_ref, 'release')
|
||||
run: |
|
||||
make docker-all
|
||||
Reference in New Issue
Block a user