-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (55 loc) · 1.75 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
62
63
64
65
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
concurrency:
group: remote-trigger-${{ github.run_id }}
cancel-in-progress: 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-all-packages:
needs: prepare
uses: ./.github/workflows/test-all-packages.yml
with:
ref: build-draft-${{ needs.prepare.outputs.timestamp }}
integration:
needs: prepare
uses: ./.github/workflows/integration.yml
with:
ref: build-draft-${{ needs.prepare.outputs.timestamp }}
create-release-branch:
needs: [prepare, test-all-packages, integration]
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 }}