-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (31 loc) · 972 Bytes
/
workflow_2.yml
File metadata and controls
31 lines (31 loc) · 972 Bytes
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
on: [ push ]
jobs:
cancel-previous-job:
name: Cancel previous workflow
if: always()
timeout-minutes: 1
runs-on: ubuntu-latest
steps:
- name: Cancel previous workflow
uses: styfle/cancel-workflow-action@0.9.1
if: github.ref != 'refs/heads/master'
with:
all_but_latest: true
access_token: ${{ secrets.GITHUB_TOKEN }}
workflow_id: ${{ github.event.workflow.id }}
job2:
name: Test Job 2s
needs: [ cancel-previous-job ]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get Build Image Workflow Status
env:
GITHUB_TOKEN: ${{ github.token }}
BRANCH: ${{ github.event.pull_request.head.ref }}
WORKFLOW: workflow_1.yml
run: |
echo "WORKFLOW_STATUS=$(sh ./.github/actions/status.sh)" >> $GITHUB_ENV
- name: Check Workflow Status
run: echo $WORKFLOW_STATUS