-
-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (36 loc) · 1.12 KB
/
push.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
name: GitHub Actions
on: [push]
# Hope can control here
# on:
# if: "! contains(github.event.head_commit.message, '[gh skip]')"
jobs:
prepare:
runs-on: ubuntu-latest
if: "! contains(github.event.head_commit.message, '[ci skip]')"
# if: "! contains(github.event.head_commit.message, '[ci skip]') && ! contains(github.event.head_commit.message, '[skip ci]') "
steps:
- run: echo "${{ github.event.head_commit.message }}"
info:
runs-on: ubuntu-latest
needs: prepare
steps:
- name: Check condition
if: "! contains(github.event.head_commit.message, '[gh skip]')"
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: |
echo "$GITHUB_CONTEXT"
- name: Show Event
run: cat ${GITHUB_EVENT_PATH}
build:
runs-on: ubuntu-latest
needs: prepare
steps:
- uses: actions/checkout@master
- name: Run a one-line script
run: echo Hello, world!
- name: Run a multi-line script
if: "! contains(github.event.head_commit.message, '[gh skip]')"
run: |
echo Add other actions to build,
echo test, and deploy your project.