feat(ci): skip build on misc files (#1854)

feat(ci): don't build on misc files
This commit is contained in:
nuxen 2024-12-01 21:20:59 +01:00 committed by GitHub
parent 4c39198c37
commit b07556ceaa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,7 +7,21 @@ on:
- "develop"
tags:
- 'v*'
paths-ignore:
- '.github/ISSUE_TEMPLATE/**'
- '.github/images/**'
- 'config.toml'
- 'docker-compose.yml'
- 'Makefile'
- '**.md'
pull_request:
paths-ignore:
- '.github/ISSUE_TEMPLATE/**'
- '.github/images/**'
- 'config.toml'
- 'docker-compose.yml'
- 'Makefile'
- '**.md'
env:
REGISTRY: ghcr.io
@ -62,7 +76,7 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
os: [ ubuntu-latest ]
cgo: [ 1, 0 ]
name: Test${{ matrix.cgo == 1 && ' CGO'|| '' }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
@ -116,7 +130,7 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [macos-latest, windows-latest]
os: [ macos-latest, windows-latest ]
cgo: [ 1, 0 ]
name: Test${{ matrix.cgo == 1 && ' CGO'|| '' }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
@ -166,11 +180,11 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ ubuntu-latest, macos-latest, windows-latest ]
cgo: [ 1, 0 ]
name: Automatic PGO ${{ matrix.cgo == 1 && 'CGO ' || ''}}run ${{ matrix.os }}
runs-on: ${{ matrix.os }}
needs: [web]
needs: [ web ]
env:
GOPATH: ${{ startsWith(matrix.os, 'windows') && 'D:\golang\go' || '' }}
GOCACHE: ${{ startsWith(matrix.os, 'windows') && 'D:\golang\cache' || '' }}
@ -207,7 +221,7 @@ jobs:
goprofilecombine:
name: Combine pprof profiles
runs-on: ubuntu-latest
needs: [pgo, test, testother]
needs: [ pgo, test, testother ]
steps:
- name: Download pprof profiles
uses: actions/download-artifact@v4
@ -237,7 +251,7 @@ jobs:
goreleaserbuild:
name: Build distribution binaries
runs-on: ubuntu-latest
needs: [web, goprofilecombine]
needs: [ web, goprofilecombine ]
steps:
- name: Checkout
uses: actions/checkout@v4
@ -267,7 +281,7 @@ jobs:
with:
distribution: goreleaser
version: "~> v2"
args: release --clean --skip=validate --skip=publish --parallelism 5
args: release --clean --skip=validate,publish --parallelism 5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -310,20 +324,20 @@ jobs:
fail-fast: true
matrix:
platform:
- linux/386
- linux/amd64
- linux/amd64/v2
- linux/amd64/v3
- linux/arm/v6
- linux/arm/v7
- linux/arm64
# - linux/mips64le
# - linux/mips64
- linux/ppc64le
# - linux/riscv64
- linux/s390x
- windows/amd64
needs: [web, goprofilecombine]
- linux/386
- linux/amd64
- linux/amd64/v2
- linux/amd64/v3
- linux/arm/v6
- linux/arm/v7
- linux/arm64
# - linux/mips64le
# - linux/mips64
- linux/ppc64le
# - linux/riscv64
- linux/s390x
- windows/amd64
needs: [ web, goprofilecombine ]
steps:
- name: Checkout
uses: actions/checkout@v4
@ -407,7 +421,7 @@ jobs:
name: Publish Docker multi-arch manifest
if: ${{ github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request' }}
runs-on: ubuntu-latest
needs: [docker]
needs: [ docker ]
steps:
- name: Download image digests
uses: actions/download-artifact@v4