summaryrefslogtreecommitdiffstats
path: root/pkg/runner/testdata/workflow_dispatch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2024-10-20 23:07:42 +0200
committerDaniel Baumann <daniel@debian.org>2024-11-09 15:38:42 +0100
commit714c83b2736d7e308bc33c49057952490eb98be2 (patch)
tree1d9ba7035798368569cd49056f4d596efc908cd8 /pkg/runner/testdata/workflow_dispatch
parentInitial commit. (diff)
downloadforgejo-act-debian.tar.xz
forgejo-act-debian.zip
Adding upstream version 1.21.4.HEADupstream/1.21.4upstreamdebian
Signed-off-by: Daniel Baumann <daniel@debian.org>
Diffstat (limited to 'pkg/runner/testdata/workflow_dispatch')
-rw-r--r--pkg/runner/testdata/workflow_dispatch/event.json6
-rw-r--r--pkg/runner/testdata/workflow_dispatch/workflow_dispatch.yml36
2 files changed, 42 insertions, 0 deletions
diff --git a/pkg/runner/testdata/workflow_dispatch/event.json b/pkg/runner/testdata/workflow_dispatch/event.json
new file mode 100644
index 0000000..d3ecab1
--- /dev/null
+++ b/pkg/runner/testdata/workflow_dispatch/event.json
@@ -0,0 +1,6 @@
+{
+ "inputs": {
+ "required": "required input",
+ "boolean": "true"
+ }
+}
diff --git a/pkg/runner/testdata/workflow_dispatch/workflow_dispatch.yml b/pkg/runner/testdata/workflow_dispatch/workflow_dispatch.yml
new file mode 100644
index 0000000..db12548
--- /dev/null
+++ b/pkg/runner/testdata/workflow_dispatch/workflow_dispatch.yml
@@ -0,0 +1,36 @@
+name: workflow_dispatch
+
+on:
+ workflow_dispatch:
+ inputs:
+ required:
+ description: a required input
+ required: true
+ with_default:
+ description: an input with default
+ required: false
+ default: default
+ boolean:
+ description: an input of type boolean
+ required: false
+ type: boolean
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ steps:
+ - name: test required input
+ run: |
+ echo input.required=${{ inputs.required }}
+ [[ "${{ inputs.required }}" = "required input" ]] || exit 1
+ - name: test input with default
+ run: |
+ echo input.with_default=${{ inputs.with_default }}
+ [[ "${{ inputs.with_default }}" = "default" ]] || exit 1
+ - id: boolean-test
+ name: run on boolean input
+ if: ${{ inputs.boolean == true }}
+ run: echo "::set-output name=value::executed"
+ - name: has boolean test?
+ run: |
+ [[ "${{ steps.boolean-test.outputs.value }}" = "executed" ]] || exit 1