-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (35 loc) · 1022 Bytes
/
test.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: "CI Test for Github Action"
on:
workflow_dispatch:
push:
jobs:
sets_false_on_missing:
name: Sets false when no artifact for the name exists
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./
with:
name: "missing-artifact"
id: "existence-check"
- name: Fail when expected output isn't set
run: |
exit 1
if: ${{ steps.existence-check.outputs.exists != 'false' }}
sets_true_when_there:
name: Sets true when no artifact for the name exists
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/upload-artifact@v4
with:
name: "artifact-that-exists"
path: action.yml
- uses: ./
with:
name: "artifact-that-exists"
id: "existence-check"
- name: Fail when expected output isn't set
run: |
exit 1
if: ${{ steps.existence-check.outputs.exists != 'true' }}