-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (57 loc) · 1.54 KB
/
cd-dispatch-deploy.yaml
File metadata and controls
57 lines (57 loc) · 1.54 KB
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
on:
workflow_call:
inputs:
gh_user:
required: true
type: string
gh_repo:
required: true
type: string
image_name:
required: true
type: string
env_name:
required: true
type: string
app_path:
required: true
type: string
auto_merge:
required: true
type: boolean
pr_assignees:
type: string
required: false
default: ""
secrets:
ACCESS_TOKEN:
required: true
jobs:
dispatch:
name: Dispatch repo event
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Extract tag as env var
run: |
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Notify repo
uses: docker://automationcloud/repository-dispatch:latest
with:
owner: ${{ inputs.gh_user }}
repository: ${{ inputs.gh_repo }}
token: ${{ secrets.ACCESS_TOKEN }}
event: cd-deploy
payload: |-
{
"ref": "${{ github.ref }}",
"sha": "${{ github.sha }}",
"tag": "${{ env.RELEASE_VERSION }}",
"image_name": "${{ inputs.image_name }}",
"image_tag": "${{ env.RELEASE_VERSION }}",
"env_name": "${{ inputs.env_name }}",
"app_path": "${{ inputs.app_path }}",
"auto_merge": ${{ inputs.auto_merge }},
"pr_assignees": "${{ inputs.pr_assignees }}"
}