Skip to content

Commit 38f86db

Browse files
committed
Some more CI tuning
1 parent 0d89af8 commit 38f86db

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

.github/workflows/CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,10 @@ jobs:
110110
rust-toolchain-name: stable
111111
flavor: doc
112112
publish-pages:
113+
if: github.event_name == 'push' && github.ref_type == 'branch' && github.ref_name == 'master'
113114
needs: build-docs
114115
runs-on: ubuntu-latest
115116
permissions:
116-
contents: read
117117
pages: write
118118
id-token: write
119119
environment:

.github/workflows/rustfmt.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ concurrency:
99
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1010
cancel-in-progress: true
1111

12+
permissions: {}
13+
1214
jobs:
1315
rustfmt-check:
1416
uses: ./.github/workflows/CI-linux.yml
@@ -24,6 +26,8 @@ jobs:
2426
rustfmt-complain:
2527
needs: [ rustfmt-check ]
2628
if: always() && github.event_name == 'pull_request_target' && needs.rustfmt-check.outputs.rustfmt-artifact-url != ''
29+
permissions:
30+
pull-requests: write
2731
runs-on: ubuntu-latest
2832
steps:
2933
- name: Create comment

.github/workflows/validate-pr-source-and-target-branches.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ concurrency:
88
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
99
cancel-in-progress: true
1010

11+
permissions:
12+
pull-requests: write
13+
1114
jobs:
1215
validation:
1316
runs-on: ubuntu-latest
@@ -23,7 +26,7 @@ jobs:
2326
env:
2427
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2528
run: |
26-
cd rawspeed
29+
cd rawspeed.rs
2730
gh pr close --comment "Pull Requests should only be submitted to `master` branch" ${{ github.event.number }}
2831
exit 1
2932
- name: Close Pull if PR is not from a proper branch
@@ -32,6 +35,6 @@ jobs:
3235
env:
3336
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3437
run: |
35-
cd rawspeed
38+
cd rawspeed.rs
3639
gh pr close --comment "Pull Requests source branch should be branched off of the Pull Request's target branch" ${{ github.event.number }}
3740
exit 1

0 commit comments

Comments
 (0)