Skip to content

Commit 20449aa

Browse files
committed
ci: Harden CI with 'contents: read' default permissions
1 parent 4427615 commit 20449aa

3 files changed

Lines changed: 11 additions & 20 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
name: Build snap and run tests
22

3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
37
on:
4-
workflow_call:
5-
outputs:
6-
snap-file:
7-
description: "The snap output of build process."
8-
value: ${{ jobs.build.outputs.snap-file }}
8+
pull_request:
9+
10+
permissions:
11+
contents: read
912

1013
jobs:
1114
build:

.github/workflows/on_pull_request.yaml

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

.github/workflows/release.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
branches:
66
- 3.4/*
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
release_checks:
1013
runs-on: ubuntu-22.04
@@ -51,5 +54,4 @@ jobs:
5154
secrets:
5255
snap-store-token: ${{ secrets.SNAP_STORE_TOKEN }}
5356
permissions:
54-
actions: read # Needed for GitHub API call to get workflow version
5557
contents: write # Needed to create GitHub release

0 commit comments

Comments
 (0)