-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (46 loc) · 1.72 KB
/
manual.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
46
47
48
49
50
51
52
53
54
55
56
# This is a basic workflow that is manually triggered
name: Manual workflow
# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
pull_request:
branches: [ branch-1 ]
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "greet"
greet:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: PWD pre git checkout
run: |
echo "pre git checkout PWD is: [$PWD]"
- name: Git checkout
uses: actions/checkout@v4
- name: PWD post git checkout
run: |
echo "post git checkout PWD is: [$PWD]"
- name: test sed
run: |
ls -al
sed -i 's/dependency=warn/dependency=info/' test.txt
cat test.txt
# Runs a single command using the runners shell
- name: print env
run: |
env
echo "--------------------------------------------------------------"
REAL_BRANCH=${GITHUB_REF_NAME}
echo "--------------------------------------------------------------"
echo "REAL_BRANCH is [${REAL_BRANCH}]"
if [[ ${GITHUB_EVENT_NAME} == "push" ]]; then
REAL_BRANCH=${GITHUB_REF_NAME}
elif [[ ${GITHUB_EVENT_NAME} == "pull_request" ]]; then
REAL_BRANCH=${GITHUB_HEAD_REF}
fi
echo "GITHUB_EVENT_NAME is [${GITHUB_EVENT_NAME}]"
echo "GITHUB_REF_NAME is [${GITHUB_REF_NAME}]"
echo "GITHUB_HEAD_REF is [${GITHUB_HEAD_REF}]"
echo "REAL_BRANCH is [${REAL_BRANCH}]"