-
Notifications
You must be signed in to change notification settings - Fork 36
33 lines (28 loc) · 1 KB
/
trigger-publish.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
name: 'Trigger Docker image build'
on:
push:
branches:
- main
workflow_dispatch:
jobs:
trigger:
name: 'trigger Docker image build'
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Get git branch name
id: get_branch
run: |
echo "::set-output name=branch::${GITHUB_REF#refs/heads/}"
- name: Dispatch docker builds Github Action
env:
PAT: ${{ secrets.COMMANDER_DATA_TOKEN }}
PARENT_REPO: temporalio/docker-builds
PARENT_BRANCH: ${{ toJSON('main') }}
WORKFLOW_ID: update-submodules.yml
REPO: ${{ toJSON('tctl') }}
BRANCH: ${{ toJSON(steps.get_branch.outputs.branch) }}
run: |
curl -fL -X POST -H "Accept: application/vnd.github.v3+json" -H "Authorization: token $PAT" "https://api.github.com/repos/$PARENT_REPO/actions/workflows/$WORKFLOW_ID/dispatches" -d '{"ref":'"$PARENT_BRANCH"', "inputs": { "repo":'"$REPO"', "branch":'"$BRANCH"' }}'