Skip to content

Commit a7b23cd

Browse files
authored
Merge pull request #405 from thaJeztah/gha_perms
gha: set default permissions, add guardrail timeouts, and update branch name (master -> main)
2 parents b871f76 + 178a3a4 commit a7b23cd

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.github/workflows/build.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
name: build
22

3+
# Default to 'contents: read', which grants actions to read commits.
4+
#
5+
# If any permission is set, any permission not included in the list is
6+
# implicitly set to "none".
7+
#
8+
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
9+
permissions:
10+
contents: read
11+
312
concurrency:
413
group: ${{ github.workflow }}-${{ github.ref }}
514
cancel-in-progress: true
@@ -8,7 +17,7 @@ on:
817
workflow_dispatch:
918
push:
1019
branches:
11-
- 'master'
20+
- 'main'
1221
tags:
1322
- 'v*'
1423
pull_request:
@@ -20,6 +29,7 @@ env:
2029
jobs:
2130
validate:
2231
runs-on: ubuntu-24.04
32+
timeout-minutes: 30 # guardrails timeout for the whole job
2333
strategy:
2434
fail-fast: false
2535
matrix:
@@ -40,6 +50,7 @@ jobs:
4050
4151
test:
4252
runs-on: ${{ matrix.os }}
53+
timeout-minutes: 30 # guardrails timeout for the whole job
4354
strategy:
4455
fail-fast: false
4556
matrix:
@@ -115,6 +126,7 @@ jobs:
115126

116127
test-sandboxed:
117128
runs-on: ubuntu-24.04
129+
timeout-minutes: 30 # guardrails timeout for the whole job
118130
steps:
119131
-
120132
name: Set up Docker Buildx
@@ -136,6 +148,10 @@ jobs:
136148

137149
build:
138150
runs-on: ubuntu-24.04
151+
timeout-minutes: 30 # guardrails timeout for the whole job
152+
permissions:
153+
# required to create GitHub release
154+
contents: write
139155
steps:
140156
-
141157
name: Checkout
@@ -182,6 +198,7 @@ jobs:
182198

183199
build-deb:
184200
runs-on: ubuntu-24.04
201+
timeout-minutes: 30 # guardrails timeout for the whole job
185202
steps:
186203
-
187204
name: Checkout

0 commit comments

Comments
 (0)