-
Notifications
You must be signed in to change notification settings - Fork 37
52 lines (47 loc) · 1.65 KB
/
Copy pathpull-request.yml
File metadata and controls
52 lines (47 loc) · 1.65 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
name: PR Build
on:
workflow_dispatch:
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
# Reusable workflows inherit caller permissions. Granting packages: read
# here lets GITHUB_TOKEN authenticate to maven.pkg.github.com (the LS
# gradle build pulls org.ballerinalang.* artifacts from there).
permissions:
contents: read
packages: read
jobs:
changes:
name: Detect changes
if: github.event_name == 'workflow_dispatch' || github.event.pull_request.draft == false
runs-on: ubuntu-latest
outputs:
build: ${{ steps.filter.outputs.build }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: dorny/paths-filter@d1c1ffe0248fe513906c8e24db8ea791d46f8590 # v3
id: filter
with:
filters: |
build:
- 'packages/**'
- 'submodules/wso2-vscode-extensions/workspaces/common-libs/**'
- 'common/**'
- 'rush.json'
- 'rush-config.json'
- '.github/workflows/pull-request.yml'
- '.github/workflows/build.yml'
- '.github/actions/**'
build:
name: Build
needs: changes
if: needs.changes.outputs.build == 'true'
uses: ./.github/workflows/build.yml
secrets: inherit
with:
runOnAWS: ${{ contains(github.event.pull_request.labels.*.name, 'Runner/AWS') }}
runBalE2ETests: ${{ contains(github.event.pull_request.labels.*.name, 'Checks/Run Ballerina UI Tests') || github.base_ref == 'stable/ballerina' }}