Skip to content

Commit c3157c1

Browse files
authored
Merge pull request #44 from vvoland/sync-template
Align with Go binary template
2 parents a6e7587 + 66b2336 commit c3157c1

51 files changed

Lines changed: 7432 additions & 275 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

renovate.json renamed to .github/renovate.json5

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@
1111
"description": "Group safe routine updates",
1212
"matchUpdateTypes": ["minor", "patch", "pin", "digest"],
1313
"groupName": "routine dependency updates"
14+
},
15+
{
16+
"description": "Allow gha-pin-diff to stay on semver tag instead of digest pinning",
17+
"matchManagers": ["github-actions"],
18+
"matchPackageNames": ["vvoland/gha-pin-diff"],
19+
"pinDigests": false,
20+
"enabled": false
1421
}
1522
],
1623
"postUpdateOptions": ["gomodTidy"]

.github/workflows/ci.yaml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
name: CI
3+
4+
on:
5+
pull_request:
6+
push:
7+
branches:
8+
- master
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
lint:
15+
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
target:
20+
- yamllint
21+
- actionlint
22+
- modernize
23+
- golangci-lint
24+
- shfmt
25+
- license
26+
steps:
27+
- name: Check out repository
28+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
29+
30+
- name: Run ${{ matrix.target }}
31+
run: make -f lint.Makefile ${{ matrix.target }}
32+
33+
test:
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Check out repository
37+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
38+
39+
- name: Set up Go
40+
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
41+
with:
42+
go-version-file: go.mod
43+
cache: true
44+
45+
- name: Install dependencies
46+
run: sudo ./hack/install-deps.sh dev
47+
48+
- name: Run tests
49+
run: go test ./...
50+
51+
build:
52+
runs-on: ubuntu-latest
53+
steps:
54+
- name: Check out repository
55+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
56+
57+
- name: Build binary
58+
run: |
59+
docker buildx create --use
60+
docker buildx bake binary \
61+
--set "*.cache-from=type=gha,scope=ci-build" \
62+
--set "*.cache-to=type=gha,mode=max,scope=ci-build"
63+
64+
success:
65+
runs-on: ubuntu-latest
66+
needs:
67+
- lint
68+
- test
69+
- build
70+
if: always()
71+
steps:
72+
- name: Check CI result
73+
run: |
74+
for result in ${{ join(needs.*.result, ' ') }}; do
75+
if [[ "$result" != "success" ]]; then
76+
exit 1
77+
fi
78+
done

.github/workflows/ci.yml

Lines changed: 0 additions & 142 deletions
This file was deleted.

.github/workflows/lint.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/workflows/pin.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: Action Pin Diff
3+
on:
4+
pull_request:
5+
paths:
6+
- ".github/workflows/**"
7+
8+
permissions:
9+
contents: read
10+
issues: write
11+
pull-requests: write
12+
13+
jobs:
14+
pin-diff:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
18+
- uses: vvoland/gha-pin-diff@v1 # v1

0 commit comments

Comments
 (0)