Skip to content

Commit 4e5a7cc

Browse files
authored
👷 ci: Adds labeler & release workflows, updates action versions (#103)
1 parent aff00f3 commit 4e5a7cc

File tree

8 files changed

+126
-33
lines changed

8 files changed

+126
-33
lines changed

.github/changelog.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"categories": [
3+
{
4+
"title": "## ✨ Features",
5+
"labels": ["enhancement"]
6+
},
7+
{
8+
"title": "## 🐛 Fixes",
9+
"labels": ["bug"]
10+
},
11+
{
12+
"title": "## 🎨 Cleanup",
13+
"labels": ["cleanup"]
14+
},
15+
{
16+
"title": "## 👷 CI/CD",
17+
"labels": ["cicd"]
18+
},
19+
{
20+
"title": "## 📌 Dependencies",
21+
"labels": ["dependencies"]
22+
}
23+
],
24+
"template": "${{CHANGELOG}}\n\n## Contributors:\n${{CONTRIBUTORS}}"
25+
}

.github/labeler.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
enhancement:
2+
- head-branch: ["^feature", "feature", "^new", "new"]
3+
4+
bug:
5+
- head-branch: ["^fix", "fix", "^bug", "bug"]
6+
7+
cicd:
8+
- head-branch: ["^ci", "ci", "^cicd", "cicd"]
9+
10+
documentation:
11+
- head-branch: ["^docs", "docs"]

.github/workflows/dependency-review.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Harden Runner
20-
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
20+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
2121
with:
2222
egress-policy: audit
2323

2424
- name: "Checkout Repository"
2525
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2626
- name: "Dependency Review"
27-
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0
27+
uses: actions/dependency-review-action@ce3cf9537a52e8119d91fd484ab5b8a807627bf8 # v4.6.0

.github/workflows/lint.yml

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ jobs:
1717
pull-requests: write
1818
steps:
1919
- name: Harden Runner
20-
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
20+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
2121
with:
2222
egress-policy: audit
2323

2424
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2525
- name: tflint
26-
uses: reviewdog/action-tflint@0a8c6a4cc8788c02fe181ea6b8530975688f1a33 # v1.23.2
26+
uses: reviewdog/action-tflint@41b4770c9d9e50741c20e431986b33124a07ca52 # v1.24.2
2727
with:
2828
github_token: ${{ github.token }}
2929
reporter: github-pr-review
30-
fail_on_error: "false"
30+
fail_on_error: true
3131
filter_mode: file
3232
tflint_init: true
3333
flags: --no-module --recursive
@@ -37,27 +37,27 @@ jobs:
3737
pull-requests: write
3838
steps:
3939
- name: Harden Runner
40-
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
40+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
4141
with:
4242
egress-policy: audit
4343

4444
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4545
- name: trivy
46-
uses: reviewdog/action-trivy@5f1fa7bde1d2105edfdd0afcca8567fcdcd4692b # v1.12.3
46+
uses: reviewdog/action-trivy@0cab87b781d62e7b01ca66d2900484dedba06306 # v1.13.10
4747
with:
4848
github_token: ${{ github.token }}
4949
trivy_command: config
5050
trivy_target: "."
5151
reporter: github-pr-review
52-
fail_on_error: "false"
52+
fail_on_error: true
5353
filter_mode: file
5454
golangci-lint:
5555
runs-on: ubuntu-latest
5656
permissions:
5757
pull-requests: write
5858
steps:
5959
- name: Harden Runner
60-
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
60+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
6161
with:
6262
egress-policy: audit
6363

@@ -67,7 +67,7 @@ jobs:
6767
with:
6868
github_token: ${{ github.token }}
6969
reporter: github-pr-review
70-
fail_on_error: "false"
70+
fail_on_error: true
7171
filter_mode: file
7272
workdir: test/
7373
go_version_file: test/go.mod
@@ -77,7 +77,7 @@ jobs:
7777
pull-requests: write
7878
steps:
7979
- name: Harden Runner
80-
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
80+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
8181
with:
8282
egress-policy: audit
8383

@@ -90,25 +90,25 @@ jobs:
9090
with:
9191
github_token: ${{ github.token }}
9292
reporter: github-pr-review
93-
fail_on_error: "false"
93+
fail_on_error: true
9494
filter_mode: file
9595
misspell:
9696
runs-on: ubuntu-latest
9797
permissions:
9898
pull-requests: write
9999
steps:
100100
- name: Harden Runner
101-
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
101+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
102102
with:
103103
egress-policy: audit
104104

105105
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
106106
- name: misspell
107-
uses: reviewdog/action-misspell@ef8b22c1cca06c8d306fc6be302c3dab0f6ca12f # v1.23.0
107+
uses: reviewdog/action-misspell@9daa94af4357dddb6fd3775de806bc0a8e98d3e4 # v1.26.3
108108
with:
109109
github_token: ${{ github.token }}
110110
reporter: github-pr-review
111-
fail_on_error: "false"
111+
fail_on_error: false
112112
filter_mode: file
113113
exclude: |
114114
./.git/*
@@ -119,17 +119,17 @@ jobs:
119119
pull-requests: write
120120
steps:
121121
- name: Harden Runner
122-
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
122+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
123123
with:
124124
egress-policy: audit
125125

126126
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
127127
- name: alex
128-
uses: reviewdog/action-alex@73756e09c07d6025e86f0ac5605b65f2d4b4b78b # v1.14.0
128+
uses: reviewdog/action-alex@6083b8ca333981fa617c6828c5d8fb21b13d916b # v1.16.0
129129
with:
130130
github_token: ${{ github.token }}
131131
reporter: github-pr-review
132-
fail_on_error: "false"
132+
fail_on_error: false
133133
filter_mode: file
134134
alex_flags: |
135135
* .github/* .github/workflows/* docs/* test/* examples/complete/*
@@ -139,35 +139,33 @@ jobs:
139139
pull-requests: write
140140
steps:
141141
- name: Harden Runner
142-
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
142+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
143143
with:
144144
egress-policy: audit
145145

146146
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
147147
- name: markdownlint
148-
uses: reviewdog/action-markdownlint@28fb4224271253fedd5079b61de820d6228041fd # v0.25.0
148+
uses: reviewdog/action-markdownlint@3667398db9118d7e78f7a63d10e26ce454ba5f58 # v0.26.2
149149
with:
150150
github_token: ${{ github.token }}
151151
reporter: github-pr-review
152-
fail_on_error: "false"
152+
fail_on_error: false
153153
filter_mode: file
154-
markdownlint_flags: |
155-
--disable MD033 MD013 -- .
156154
actionlint:
157155
runs-on: ubuntu-latest
158156
permissions:
159157
pull-requests: write
160158
steps:
161159
- name: Harden Runner
162-
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
160+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
163161
with:
164162
egress-policy: audit
165163

166164
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
167165
- name: actionlint
168-
uses: reviewdog/action-actionlint@7eeec1dd160c2301eb28e1568721837d084558ad # v1.57.0
166+
uses: reviewdog/action-actionlint@a5524e1c19e62881d79c1f1b9b6f09f16356e281 # v1.65.2
169167
with:
170168
github_token: ${{ github.token }}
171169
reporter: github-pr-review
172-
fail_on_error: "false"
170+
fail_on_error: true
173171
filter_mode: file

.github/workflows/pr-label.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Label Pull Request
2+
3+
on:
4+
pull_request:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
label:
11+
runs-on: ubuntu-latest
12+
13+
permissions:
14+
contents: read
15+
pull-requests: write
16+
17+
steps:
18+
- uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
19+
with:
20+
egress-policy: audit
21+
22+
- uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 #v5.0.0

.github/workflows/release.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Publish release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
15+
permissions:
16+
contents: write
17+
pull-requests: write
18+
deployments: write
19+
20+
steps:
21+
- uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
22+
with:
23+
egress-policy: audit
24+
25+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
26+
27+
- uses: mikepenz/release-changelog-builder-action@e92187bd633e680ebfdd15961a7c30b2d097e7ad # v5
28+
id: build_changelog
29+
with:
30+
configuration: .github/changelog.json
31+
failOnError: "true"
32+
fetchReviewers: "true"
33+
34+
- uses: softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631 # v2.2.2
35+
if: startsWith(github.ref, 'refs/tags/')
36+
with:
37+
body: ${{steps.build_changelog.outputs.changelog}}

.github/workflows/scorecard.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333

3434
steps:
3535
- name: Harden Runner
36-
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
36+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
3737
with:
3838
egress-policy: audit
3939

@@ -43,7 +43,7 @@ jobs:
4343
persist-credentials: false
4444

4545
- name: "Run analysis"
46-
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
46+
uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
4747
with:
4848
results_file: results.sarif
4949
results_format: sarif
@@ -65,14 +65,14 @@ jobs:
6565
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
6666
# format to the repository Actions tab.
6767
- name: "Upload artifact"
68-
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
68+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
6969
with:
7070
name: SARIF file
7171
path: results.sarif
7272
retention-days: 5
7373

7474
# Upload the results to GitHub's code scanning dashboard.
7575
- name: "Upload to code-scanning"
76-
uses: github/codeql-action/upload-sarif@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5
76+
uses: github/codeql-action/upload-sarif@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
7777
with:
7878
sarif_file: results.sarif

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: "Harden Runner"
17-
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
17+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
1818
with:
1919
egress-policy: audit
2020

2121
- name: "Checkout"
22-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
22+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2323

2424
- name: "Setup Go"
25-
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
25+
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
2626
with:
2727
go-version-file: test/go.mod
2828
cache: true

0 commit comments

Comments
 (0)