-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
37 lines (32 loc) · 1018 Bytes
/
action.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
# https://docs.github.com/en/actions/sharing-automations/creating-actions/creating-a-composite-action
name: "Hello World"
description: "Greet someone"
inputs:
who-to-greet: # id of input
description: "Who to greet"
required: true
default: "World"
outputs:
random-number:
description: "Random number"
value: ${{ steps.random-number-generator.outputs.random-number }}
runs:
using: "composite"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set Greeting
run: echo "Hello $INPUT_WHO_TO_GREET."
shell: bash
env:
INPUT_WHO_TO_GREET: ${{ inputs.who-to-greet }}
- name: Random Number Generator
id: random-number-generator
run: echo "random-number=$(echo $RANDOM)" >> $GITHUB_OUTPUT
shell: bash
- name: Set GitHub Path
run: echo "GITHUB_ACTION_PATH=${GITHUB_ACTION_PATH}" >> $GITHUB_ENV
shell: bash
- name: Run goodbye.sh
run: $GITHUB_ACTION_PATH/scripts/goodbye.sh
shell: bash