|
1 | 1 | name: "examples"
|
2 | 2 | on: [pull_request]
|
3 | 3 |
|
4 |
| -jobs: |
| 4 | +#jobs: |
5 | 5 | # make sure the action works on a clean machines without building
|
6 | 6 |
|
7 | 7 | ## Basic
|
8 |
| - test_basic_success: |
9 |
| - runs-on: ubuntu-latest |
10 |
| - steps: |
11 |
| - - uses: actions/checkout@v1 |
12 |
| - with: |
13 |
| - #token: ${{ secrets.TEST }} |
14 |
| - name: Test Basic Success |
15 |
| - conclusion: success |
| 8 | +# test_basic_success: |
| 9 | +# runs-on: ubuntu-latest |
| 10 | +# steps: |
| 11 | +# - uses: actions/checkout@v1 |
| 12 | + |
| 13 | +# run: | |
| 14 | +# chmod |
16 | 15 |
|
17 |
| - - uses: actions/github-script@v3 |
18 |
| - with: |
19 |
| - github-token: ${{github.token}} |
20 |
| - script: | |
21 |
| - github.issues.createComment({ |
22 |
| - issue_number: context.issue.number, |
23 |
| - owner: context.repo.owner, |
24 |
| - repo: context.repo.repo, |
25 |
| - body: '👋 Thanks for reporting!' |
26 |
| - }) |
| 16 | +# - uses: actions/github-script@v3 |
| 17 | +# with: |
| 18 | +# github-token: ${{github.token}} |
| 19 | +# script: | |
| 20 | +# github.issues.createComment({ |
| 21 | +# issue_number: context.issue.number, |
| 22 | +# owner: context.repo.owner, |
| 23 | +# repo: context.repo.repo, |
| 24 | +# body: '👋 Thanks for reporting!' |
| 25 | +# }) |
| 26 | + |
| 27 | +# test_basic_success_with_output: |
| 28 | +# runs-on: ubuntu-latest |
| 29 | +# steps: |
| 30 | +# - uses: actions/checkout@v1 |
| 31 | +# with: |
| 32 | +# #token: ${{ secrets.TEST }} |
| 33 | +# name: Test Basic Success (Implicit) |
| 34 | +# conclusion: success |
| 35 | +# output: | |
| 36 | +# {"summary":"Test was a success","text_description":"This is a text description of the annotations and images\nWith more stuff\nAnd more"} |
| 37 | + |
| 38 | +jobs: |
| 39 | + |
| 40 | + build: |
| 41 | + runs-on: ubuntu-latest |
| 42 | + continue-on-error: true |
| 43 | + steps: |
| 44 | + - name: Check out repository |
| 45 | + id: checkout |
| 46 | + uses: actions/checkout@v2 |
| 47 | + |
| 48 | + - name: create a failure |
| 49 | + id: failure_step |
| 50 | + run: | |
| 51 | + ! echo "Hello" |
27 | 52 |
|
28 |
| - test_basic_success_with_output: |
29 |
| - runs-on: ubuntu-latest |
30 |
| - steps: |
31 |
| - - uses: actions/checkout@v1 |
32 |
| - with: |
33 |
| - #token: ${{ secrets.TEST }} |
34 |
| - name: Test Basic Success (Implicit) |
35 |
| - conclusion: success |
36 |
| - output: | |
37 |
| - {"summary":"Test was a success","text_description":"This is a text description of the annotations and images\nWith more stuff\nAnd more"} |
| 53 | + - name: Check failure here |
| 54 | + #if: ${{ success() }} |
| 55 | + if: ${{ steps.failure_step.outcome == 'failure' }} |
| 56 | + uses: actions/github-script@v3 |
| 57 | + with: |
| 58 | + github-token: ${{github.token}} |
| 59 | + script: | |
| 60 | + github.issues.createComment({ |
| 61 | + issue_number: context.issue.number, |
| 62 | + owner: context.repo.owner, |
| 63 | + repo: context.repo.repo, |
| 64 | + body: '🚨 The Unit tests run failed' |
| 65 | + }) |
0 commit comments