-
Notifications
You must be signed in to change notification settings - Fork 6
60 lines (47 loc) · 1.92 KB
/
levitate-detect-run.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# This workflow only runs if anything under packages/ changes. (Otherwise levitate-detect-skip.yml takes over)
name: Levitate / Detect breaking changes
on:
pull_request:
paths:
- "packages/**"
jobs:
detect:
name: Detect breaking changes
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3.5.1
with:
node-version: 16.16.0
- name: Sample step
run: echo "Running the DETECT job."
- name: Test output parameters with a script
id: test-script
run: ./.github/workflows/scripts/test-script.sh
- name: Test output parameters with inline bash
id: test-inline-bash
run: echo "param_1=foo" >> $GITHUB_OUTPUT
- name: Test output parameters with inline bash using quotes (for shellcheck)
id: test-inline-bash-quotes
run: echo "param_1=foo" >> "$GITHUB_OUTPUT"
- name: Print out test output parameters
run: |
echo "Script/Param 1: ${{ steps.test-script.outputs.param_1 }}"
echo "Script/Param 2: ${{ steps.test-script.outputs.param_2 }}"
echo "Inline BASH: ${{ steps.test-inline-bash.outputs.param_1 }}"
echo "Inline BASH (quotes): ${{ steps.test-inline-bash-quotes.outputs.param_1 }}"
shell: bash
# Build and persist output as a JSON
- name: Persisting the check output
run: |
mkdir -p ./levitate
echo "{ \"exit_code\": 0, \"message\": \"Some useful levitate message!\", \"pr_number\": \"${{ github.event.pull_request.number }}\" }" > ./levitate/result.json
# Upload artifact (so it can be used in the more privileged "report" workflow)
- name: Upload check output as artifact
uses: actions/upload-artifact@v3
with:
name: levitate
path: levitate/
- name: Exit
run: exit ${{ steps.test-script.outputs.param_1 }}
shell: bash