-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (56 loc) · 1.87 KB
/
example_basic.yaml
File metadata and controls
67 lines (56 loc) · 1.87 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Example - Basic Workflow
on:
workflow_dispatch:
env:
SPRITES_TOKEN: ${{ secrets.SPRITES_TOKEN }}
jobs:
basic-workflow:
name: Basic Workflow
runs-on: ubuntu-latest
steps:
- name: Init Sprite
id: init
uses: cmbrose/sprite-kit/init@v1.0.3
- name: Verify init outputs
run: |
echo "Sprite Name: ${{ steps.init.outputs.sprite-name }}"
echo "Job Key: ${{ steps.init.outputs.job-key }}"
echo "Run ID: ${{ steps.init.outputs.run-id }}"
# Verify outputs are set
test -n "${{ steps.init.outputs.sprite-name }}" || exit 1
test -n "${{ steps.init.outputs.job-key }}" || exit 1
test -n "${{ steps.init.outputs.run-id }}" || exit 1
- name: Step 1 - Echo test
id: step1
uses: cmbrose/sprite-kit/run@v1.0.3
with:
step-key: echo-test
run: echo "Hello from step 1"
- name: Verify step 1 outputs
run: |
echo "Skipped: ${{ steps.step1.outputs.skipped }}"
echo "Checkpoint ID: ${{ steps.step1.outputs.checkpoint-id }}"
echo "Exit Code: ${{ steps.step1.outputs.exit-code }}"
test "${{ steps.step1.outputs.exit-code }}" = "0" || exit 1
test -n "${{ steps.step1.outputs.checkpoint-id }}" || exit 1
- name: Step 2 - Multi-line command
id: step2
uses: cmbrose/sprite-kit/run@v1.0.3
with:
step-key: multiline-test
run: |
echo "Line 1"
echo "Line 2"
echo "Line 3"
- name: Step 3 - Environment variable test
id: step3
uses: cmbrose/sprite-kit/run@v1.0.3
with:
step-key: env-test
run: |
echo "Testing environment"
pwd
whoami
- name: Cleanup Sprite
if: always()
uses: cmbrose/sprite-kit/clean@v1.0.3