-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (47 loc) · 1.85 KB
/
sample_workflow_command.yml
File metadata and controls
48 lines (47 loc) · 1.85 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
name: "Test workflow commands"
on:
workflow_dispatch:
jobs:
test-workflow-commands:
runs-on: ubuntu-latest
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Stop and restart workflow commands
id: gen-token
run: |
COMMAND_RESUME_TOKEN=$(echo -n ${{ github.token }} | sha256sum | head -c 64)
echo "gen-token=$COMMAND_RESUME_TOKEN" >> $GITHUB_OUTPUT
echo "::stop-commands::$COMMAND_RESUME_TOKEN"
echo "::error::Stop!!!!!!!!!!!!!!!!"
echo "::error::Stop yet!!!!!!!!!!!!!!!!"
# echo "::$COMMAND_RESUME_TOKEN::"
echo "::error::Not stop!!!!!!!!!!!!!!!!"
- name: Output message(debug)
run: echo "::debug::Set the Octocat variable"
# - name: Stop command workflow processing
# run: |
# echo "::stop-commands::${{steps.gen-token.outputs.gen-token}}"
- name: Masking a string
run: echo "::add-mask::Octocat"
- name: Output message(notice)
run: echo "::notice file=app.js,line=1,col=5,endColumn=7::Missing semicolon"
- name: Output message(warning)
run: echo "::warning file=app.js,line=1,col=5,endColumn=7::Missing semicolon"
- name: Output message(error)
run: echo "::error file=app.js,line=1,col=5,endColumn=7::Missing semicolon"
- name: Resume workflow command processing
run: echo "::${{steps.gen-token.outputs.gen-token}}::"
- name: Output message(without parameter)
run: echo "::error file=,line=,col=,endColumn=::Missing semicolon"
- name: Update other workflow
run: |
cat <<EOF >> ./fail-merge.yml
echo "This is added step!!!!!!!"
EOF
- name: Debug
uses: mxschmitt/action-tmate@v3
- name: Confirm result
run: cat ./fail-merge.yml