-
Notifications
You must be signed in to change notification settings - Fork 40
40 lines (35 loc) · 1013 Bytes
/
build.yml
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
38
39
40
name: Chaindata Build
on:
# runs after each push to current branch
push:
# can be run manually from the `Actions` tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow pushing commits
permissions:
contents: write
id-token: write
concurrency:
# only run 1 job per branch/pr/etc at a time
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build-main:
name: 'Build main'
uses: ./.github/workflows/build-jobs.yml
if: github.ref_name == 'main'
secrets: inherit
# Sets permissions of the GITHUB_TOKEN to allow pushing commits
permissions:
contents: write
id-token: write
build-pr:
name: 'Build PR'
uses: ./.github/workflows/build-jobs.yml
if: github.ref_name != 'main'
with:
environment: 'pr-builds'
secrets: inherit
# Sets permissions of the GITHUB_TOKEN to allow pushing commits
permissions:
contents: write
id-token: write