-
Notifications
You must be signed in to change notification settings - Fork 28
38 lines (33 loc) · 1.02 KB
/
build_images.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
name: Send Build Image Event
on:
workflow_call:
inputs:
ref:
required: true
type: string
event_name:
required: true
type: string
secrets:
token:
required: true
jobs:
determine_whether_to_run:
runs-on: ubuntu-latest
outputs:
send_event: ${{ steps.check-send-event.outputs.run_jobs }}
steps:
- name: Check if event should be sent
id: check-send-event
run: (echo "${{ inputs.ref }}" | grep -Eq '^refs\/tags\/[0-9]+\.[0-9]+\.[0-9]+$') && echo "::set-output name=run_jobs::true" || echo "::set-output name=run_jobs::false"
send_event:
needs: determine_whether_to_run
runs-on: ubuntu-latest
if: needs.determine_whether_to_run.outputs.send_event == 'true'
steps:
- name: Send Repo Dispatch Event
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.token }}
repository: appbaseio-confidential/elasticsearch-packer-build
event-type: ${{ inputs.event_name }}