-
-
Notifications
You must be signed in to change notification settings - Fork 8
37 lines (33 loc) · 777 Bytes
/
ci.yml
File metadata and controls
37 lines (33 loc) · 777 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: ci
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
jobs:
initialize:
name: Initialize
runs-on: ubuntu-latest
steps:
- name: Get PR head ref
if: ${{ github.event_name == 'pull_request' }}
id: pr_head_ref
run: |
echo "ref=refs/pull/${{ github.event.pull_request.number }}/head" >> $GITHUB_OUTPUT
outputs:
ref: >-
${{
(github.event_name == 'pull_request' && startsWith(github.head_ref, 'release/v'))
&& steps.pr_head_ref.outputs.ref
|| github.ref
}}
build:
name: Build
needs: [initialize]
uses: ./.github/workflows/build.yml
with:
ref: ${{ needs.initialize.outputs.ref }}