-
Notifications
You must be signed in to change notification settings - Fork 19
72 lines (67 loc) · 2.15 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Test
on:
pull_request:
push:
branches:
- master
jobs:
test:
name: Run Operating System Tests
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: 'tag-exists-action: true'
id: exists
uses: ./
with:
tag: 'v1.0.0'
- name: 'tag-exists-action: false'
id: not-exists
uses: ./
with:
tag: 'not-exist-tag-for-testing'
- name: 'tag-exists-action: external repo - true'
id: external-repo-tag-exists
uses: ./
with:
tag: 'v3.6.0'
repo: 'actions/checkout'
- name: 'tag-exists-action: external repo - false'
id: external-repo-tag-not-exists
uses: ./
with:
tag: 'not-exist-tag-for-testing'
repo: 'actions/checkout'
- name: 'tag-exists-action: external repo exists - false'
id: external-repo-not-exists
uses: ./
with:
tag: 'not-exist-tag-for-testing'
repo: 'fakeRepo/fakerepo'
- name: Result of exists
if: always()
run: test "true" = "${{ steps.exists.outputs.exists }}"
- name: Result of not-exists
if: always()
run: test "false" = "${{ steps.not-exists.outputs.exists }}"
- name: Result of external-repo-tag-exists
if: always()
run: test "true" = "${{ steps.external-repo-tag-exists.outputs.exists }}"
- name: Result of external-repo-tag-not-exists
if: always()
run: test "false" = "${{ steps.external-repo-tag-not-exists.outputs.exists }}"
- name: Result of external-repo-not-exists
if: always()
run: test "false" = "${{ steps.external-repo-not-exists.outputs.exists }}"
- run: echo "yes"
if: ${{ steps.exists.outputs.exists == 'true' }}
- run: echo "no"
if: steps.not-exists.outputs.exists == 'false'
- run: echo "yesxxxxx"
if: ${{ steps.exists.outputs.exists == 'false' }}
- run: echo "noxxxxx"
if: steps.not-exists.outputs.exists == 'true'