-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (45 loc) · 1.25 KB
/
firstWorkFlow.yml
File metadata and controls
49 lines (45 loc) · 1.25 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
name: first workflow
env:
WORKFLOW_VAR: "This variable is declared at the workflow level"
on:
workflow_dispatch:
jobs:
firstjob:
runs-on: ubuntu-latest
steps:
- name: firstJob script
shell: bash
run: echo Hello World! This is the first job
- name: Checkout
uses: actions/checkout@v4.0.0
- name: greetings
id: greetings
uses: actions/hello-world-javascript-action@main
with:
who-to-greet: 'Mona the Octocat'
- name: time
run: |
echo "The time of the greeting was at: ${{ steps.greetings.outputs.time }}"
secondjob:
runs-on: ubuntu-latest
needs: firstjob
env:
JOB_VAR: " This is a job variable"
steps:
- name: secondJob script
shell: bash
run: |
echo this is the second job
echo and this is a multi-line script
- name: environment variables
env:
STEP_VAR: "This variable is declared at the step level"
run: |
echo $WORKFLOW_VAR
echo $JOB_VAR
echo $STEP_VAR
echo "The following is a secret: ${{ secrets.SOME_SECRET }}, of course, I cant tell you because then it wouldnt be a secret..."
echo "The following are default environment variables:"
echo $GITHUB_ACTOR
echo $GITHUB_JOB
echo $GITHUB_REF