Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.

Commit aa1f440

Browse files
ci: SRE-391: Assign job permissions (#1144)
* ci: SRE-384: Fix cancel pipeline * ci: SRE-391: Assign job permissions * Remove default permissions
1 parent 87119a8 commit aa1f440

File tree

6 files changed

+12
-8
lines changed

6 files changed

+12
-8
lines changed

Diff for: .github/workflows/build_bundle.yml

+2
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ jobs:
2020
if: "!contains(github.event.head_commit.message, 'skip ci')"
2121
steps:
2222
- uses: hmarr/[email protected]
23+
2324
- name: "Checkout codebase"
2425
uses: actions/checkout@v3
2526
with:
27+
token: ${{ secrets.GITHUB_TOKEN }}
2628
ref: ${{ inputs.sha }}
2729

2830
- uses: actions/setup-node@v3

Diff for: .github/workflows/cancel_cicd_pipeline.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
name: "Cancel PR CI/CD pipeline"
22

33
on:
4-
pull_request_target:
4+
pull_request:
55
types:
66
- closed
77
- converted_to_draft
88
- locked
99
branches:
10-
- develop
10+
- master
11+
- 'lse-release/**'
12+
- 'ls-release/**'
1113

1214
concurrency:
1315
group: CI/CD Pipeline-${{ github.event.pull_request.number || github.event.pull_request.head.ref || github.ref_name }}

Diff for: .github/workflows/cicd_pipeline.yml

-6
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,18 @@ concurrency:
2121
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.pull_request.head.ref || github.ref_name }}
2222
cancel-in-progress: true
2323

24-
permissions: read-all
25-
2624
jobs:
2725
build_bundle:
2826
name: "Build JS Bundle"
2927
if: github.event_name == 'push' || github.event.pull_request.draft == false
3028
uses: heartexlabs/label-studio-frontend/.github/workflows/build_bundle.yml@master
31-
permissions:
32-
contents: write
3329
with:
3430
sha: ${{ github.event.pull_request.head.sha || github.event.after }}
3531

3632
run_e2e:
3733
name: "Tests"
3834
if: github.event_name == 'push' || github.event.pull_request.draft == false
3935
uses: heartexlabs/label-studio-frontend/.github/workflows/e2e_tests.yml@master
40-
permissions:
41-
contents: write
4236
needs:
4337
- build_bundle
4438
with:

Diff for: .github/workflows/e2e_tests.yml

+2
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ jobs:
2020
if: "!contains(github.event.head_commit.message, 'skip ci')"
2121
steps:
2222
- uses: hmarr/[email protected]
23+
2324
- name: "Checkout codebase"
2425
uses: actions/checkout@v3
2526
with:
27+
token: ${{ secrets.GITHUB_TOKEN }}
2628
ref: ${{ inputs.sha }}
2729

2830
- uses: actions/setup-node@v3

Diff for: .github/workflows/eslint.yml

+2
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ jobs:
2020
if: "!contains(github.event.head_commit.message, 'skip ci')"
2121
steps:
2222
- uses: hmarr/[email protected]
23+
2324
- name: "Checkout codebase"
2425
uses: actions/checkout@v3
2526
with:
27+
token: ${{ secrets.GITHUB_TOKEN }}
2628
ref: ${{ inputs.sha }}
2729

2830
- name: "Setup NodeJS"

Diff for: .github/workflows/unit_tests.yml

+2
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ jobs:
2020
if: "!contains(github.event.head_commit.message, 'skip ci')"
2121
steps:
2222
- uses: hmarr/[email protected]
23+
2324
- name: "Checkout codebase"
2425
uses: actions/checkout@v3
2526
with:
27+
token: ${{ secrets.GITHUB_TOKEN }}
2628
ref: ${{ inputs.sha }}
2729

2830
- name: "Setup NodeJS"

0 commit comments

Comments
 (0)