-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (78 loc) · 2.11 KB
/
start-build.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: build cloudflare dns image
on:
workflow_call:
inputs:
dockerfile:
required: true
type: string
dockerfile_alpine:
required: true
type: string
image_title:
required: true
type: string
license:
required: true
type: string
tag:
required: true
type: string
alpine_tag:
required: true
type: string
go_plugin_link:
required: true
type: string
hash_file:
required: true
type: string
plugin_name:
required: true
type: string
repo:
required: true
type: string
concurrency: ${{ inputs.plugin_name }}
jobs:
build-image:
uses: FarisZR/caddy-dns-OCI/.github/workflows/build-image.yml@main
secrets: inherit
permissions:
packages: write
with:
image_name: fariszr/caddy-dns
dockerfile: ${{ inputs.dockerfile }}
image_title: ${{ inputs.image_title }}
license: ${{ inputs.license }}
tag: ${{ inputs.tag }}
go_plugin_link: ${{ inputs.go_plugin_link }}
build-alpine-image:
uses: FarisZR/caddy-dns-OCI/.github/workflows/build-image.yml@main
secrets: inherit
permissions:
packages: write
with:
image_name: fariszr/caddy-dns
dockerfile: ${{ inputs.dockerfile_alpine }}
image_title: ${{ inputs.image_title }}
license: ${{ inputs.license }}
tag: ${{ inputs.alpine_tag }}
go_plugin_link: ${{ inputs.go_plugin_link }}
update-plugin-build-commit:
runs-on: ubuntu-latest
needs: build-image
env:
HASH_FILE: ${{ inputs.hash_file }}
REPO: ${{ inputs.repo }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: fetch latest commits
run: git pull
- name: Update build commit
run: git ls-remote ${{ env.REPO }} HEAD > ${{ env.HASH_FILE }}
- name: commit and push hash update
uses: stefanzweifel/git-auto-commit-action@v4
with:
file_pattern: ${{ inputs.hash_file }}
commit_message: update ${{ inputs.plugin_name }} build commit