-
Notifications
You must be signed in to change notification settings - Fork 33
63 lines (55 loc) · 2.16 KB
/
debug.yaml
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
57
58
59
60
61
62
63
name: rust ci
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+"
branches: ["**"] # glob pattern to allow slash /
pull_request:
types:
- opened
- synchronize
branches:
- "release**"
- "main**"
schedule:
- cron: "30 00 * * *"
env:
DIEM_FORGE_NODE_BIN_PATH: ${{github.workspace}}/diem-node
LIBRA_CI: 1
MODE_0L: "TESTNET"
jobs:
upgrades:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
# NOTE: for debugging CI this allow shell access to github runner. Will print out tmate.io terminal url
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
# with:
# detached: true
# timeout-minutes: 5
- name: Check out code
uses: actions/checkout@v3
# should always run unless we know and expect the upgrade to be breaking. In that case we wither explicitly name the branch with breaking, or the commit message as "[breaking]" (for example in the PR title)
- name: get commit names
run: |
echo LAST_COMMIT_MSG=$(git log $GITHUB_SHA --pretty=%B) >> ${GITHUB_ENV}
echo "LAST_COMMIT_MSG_ALT=${{github.event.head_commit.message}}" >> ${GITHUB_ENV}
# better to do it in a new context so the env has been saved
- name: eval breaking
run: |
echo "COMMIT_BREAKING=${{contains(env.LAST_COMMIT_MSG_ALT, '[breaking]') || contains(env.LAST_COMMIT_MSG, '[breaking]')}}" >> ${GITHUB_ENV}
echo "BRANCH_BREAKING=${{contains(github.ref_name, 'breaking-') || contains(github.ref, 'breaking-') || contains(github.head_ref, 'breaking-')}}" >> ${GITHUB_ENV}
- name: should run
if: ${{env.BRANCH_BREAKING=='true' || env.COMMIT_BREAKING=='true'}}
run: |
echo LAST_COMMIT_MSG: ${{ env.LAST_COMMIT_MSG }}
echo LAST_COMMIT_MSG_ALT: ${{ env.LAST_COMMIT_MSG_ALT }}
echo BRANCH_BREAKING: ${{ env.BRANCH_BREAKING }}
echo COMMIT_BREAKING: ${{ env.COMMIT_BREAKING }}
echo "should run"
- name: shoul not run
if: ${{!env.BRANCH_BREAKING=='true'}}
run:
echo "should not run"