forked from devops-actions/actionlint
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (39 loc) · 1.43 KB
/
workflow-with-errors.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
name: Example of errors
on:
workflow_dispatch:
inputs:
example-input:
description: 'Example input'
required: false
default: 'example'
permissions:
contents: read
jobs:
job-with-errors:
runs-on: ubuntu-latest
needs: test-local-action
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
with:
egress-policy: audit
- name: Non existing output
id: fake-output
run: |
echo "Let's echo an output that does not exist, should fail the check:"
echo "Output that does not exist: ${{ needs.test-local-action.outputs.fake-output }}"
- name: Non existing needs
id: fake-needs-setup
run: |
echo "Let's echo an output that does not exist, should fail the check:"
echo "Output that does not exist: ${{ needs.test-job.outputs.fake-output }}"
- name: Non existing secret
id: fake-secret
run: |
echo "Let's echo a secret that does not exist, would be nice if this would fail the check:"
echo "Secret that does not exist: ${{ secrets.fake-secret }}"
- name: Bash injection
run: |
echo "Let's echo a an input value that should fail the check:"
echo "User input should not be trusted: ${{ inputs.example-input }}"
export UserInput=${{ inputs.example-input }}