From 3880dce0023450d878efa43562d84daaf1134ae5 Mon Sep 17 00:00:00 2001 From: estebanthi Date: Mon, 5 Jan 2026 09:25:14 +0100 Subject: [PATCH] action --- .github/actions/example-composite/action.yml | 40 ++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/actions/example-composite/action.yml diff --git a/.github/actions/example-composite/action.yml b/.github/actions/example-composite/action.yml new file mode 100644 index 0000000..4fe535b --- /dev/null +++ b/.github/actions/example-composite/action.yml @@ -0,0 +1,40 @@ +name: Example Composite +description: Example composite action for testing. + +inputs: + message: + description: Message to echo. + required: false + default: "Hello from composite action" + repeat: + description: Number of times to print the message. + required: false + default: "1" + +runs: + using: composite + steps: + - name: Show inputs + shell: bash + run: | + echo "message=${{ inputs.message }}" + echo "repeat=${{ inputs.repeat }}" + + - name: Print message + shell: bash + run: | + set -euo pipefail + count="${{ inputs.repeat }}" + if ! [[ "$count" =~ ^[0-9]+$ ]]; then + echo "repeat must be an integer, got: $count" >&2 + exit 1 + fi + for _ in $(seq 1 "$count"); do + echo "${{ inputs.message }}" + done + + - name: Show context + shell: bash + run: | + echo "repo=${GITHUB_REPOSITORY}" + echo "ref=${GITHUB_REF}"