-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (53 loc) · 1.64 KB
/
test-workflow-dispatch.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
57
58
59
60
61
name: Remote Trigger Workflow
on:
workflow_dispatch:
inputs:
message:
description: 'Message from the remote repo'
required: true
default: 'Hello from remote'
data:
description: 'Additional data'
required: false
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
timestamp: ${{ steps.set-timestamp.outputs.timestamp }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set timestamp
id: set-timestamp
run: |
TIMESTAMP=$(date +%Y%m%d%H%M%S)
echo "timestamp=$TIMESTAMP" >> $GITHUB_OUTPUT
- name: Create draft branch
run: |
git checkout -b build-draft-${{ steps.set-timestamp.outputs.timestamp }}
git push origin build-draft-${{ steps.set-timestamp.outputs.timestamp }}
test:
needs: prepare
runs-on: ubuntu-latest
strategy:
matrix:
job: [test-all-packages, integration]
steps:
- name: Run ${{ matrix.job }}
uses: ./.github/workflows/${{ matrix.job }}.yml
with:
ref: build-draft-${{ needs.prepare.outputs.timestamp }}
create-release-branch:
needs: [prepare, test]
if: success()
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create release branch
run: |
git checkout -b build-release-${{ needs.prepare.outputs.timestamp }}
git push origin build-release-${{ needs.prepare.outputs.timestamp }}
- name: Delete draft branch
run: |
git push origin --delete build-draft-${{ needs.prepare.outputs.timestamp }}