-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (46 loc) · 1.42 KB
/
build_docker_image.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
name: build-docker-image
on:
repository_dispatch:
types:
- dispatch-build-docker-image
workflow_dispatch:
inputs:
tag:
description: docker-image-tag
required: false
type: string
default: dev
platforms:
description: platform-filter-json
required: false
type: string
default: |-
[ "linux/amd64" ]
jobs:
configure:
uses: jr200/github-action-templates/.github/workflows/preconfigure.yml@main
with:
event_name: ${{ toJson(github.event_name) }}
event: ${{ toJson(github.event) }}
main:
needs: configure
uses: jr200/github-action-templates/.github/workflows/build_docker_image_multiplatform.yml@main
with:
registry_name: ghcr.io
image_name: ${{ github.repository }}
tag: ${{ fromJson(needs.configure.outputs.context).tag }}
platforms: ${{ fromJson(needs.configure.outputs.context).platforms }}
secrets:
registry_username: ${{ github.actor }}
registry_token: ${{ secrets.GITHUB_TOKEN }}
spawn-workflow:
needs: main
runs-on: ubuntu-latest
steps:
- name: dispatch-next-workflow
uses: peter-evans/repository-dispatch@v3
if: github.event_name != 'workflow_dispatch'
with:
event-type: dispatch-build-helm-chart
token: ${{ secrets.GITHUB_TOKEN }}
client-payload: ${{ toJson(github.event.client_payload) }}