Skip to content

Commit f519bd4

Browse files
committed
ci: add pull-requests: write permission
1 parent c2f8937 commit f519bd4

File tree

1 file changed

+2
-20
lines changed

1 file changed

+2
-20
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,16 @@ on:
1010

1111
permissions:
1212
contents: read
13+
pull-requests: write
1314

1415
jobs:
15-
initialize:
16-
name: Initialize
17-
runs-on: ubuntu-22.04
18-
steps:
19-
- name: Get PR head ref
20-
if: ${{ github.event_name == 'pull_request' }}
21-
id: pr_head_ref
22-
run: |
23-
echo "ref=refs/pull/${{ github.event.pull_request.number }}/head" >> $GITHUB_OUTPUT
24-
outputs:
25-
ref: >-
26-
${{
27-
(github.event_name == 'pull_request' && startsWith(github.head_ref, 'release/v'))
28-
&& steps.pr_head_ref.outputs.ref
29-
|| github.ref
30-
}}
31-
3216
checks:
3317
name: Checks
3418
uses: ./.github/workflows/checks.yml
3519

3620
build:
3721
name: ${{ matrix.platform }}
38-
needs: [initialize, checks]
22+
needs: [checks]
3923
runs-on: ${{ matrix.os }}
4024
strategy:
4125
fail-fast: false
@@ -59,8 +43,6 @@ jobs:
5943
steps:
6044
- name: Checkout source code
6145
uses: actions/checkout@v4
62-
with:
63-
ref: ${{ github.ref }}
6446

6547
- name: Install Rust
6648
uses: dtolnay/rust-toolchain@master

0 commit comments

Comments
 (0)