-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (77 loc) · 2.71 KB
/
gha-gitops-manifest-update.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
name: gha-gitops-manifest-update
on:
workflow_call:
inputs:
registry:
type: string
description: e.g. ghcr.io/gh-user, xyz.azurecr.io or docker.io
required: true
repository:
type: string
description: Accepts multiple deployment names when separated by a space e.g. deploy1 deploy2 deploy3
required: true
repository-prefix:
type: string
description: e.g. prefix/
default: ''
tag:
type: string
description: e.g. latest, latest-dev, 1.2.3
required: true
git-repository:
type: string
description: e.g. gh-user/my-repo-name
default: ${{ github.repository }}
manifest:
type: string
description: Accepts multiple manifest names (without file extension) when separated by a space e.g. deploy1 deploy2 deploy3 (deploy1.yaml etc...)
required: true
manifest-path:
type: string
description: e.g. src/workloads
required: true
fullSemVer:
type: string
description: e.g. 1.2.301-feature-my-feature.12
required: true
git-user-name:
type: string
description: e.g. Tom Cruise
required: true
git-user-email:
type: string
description: e.g. tom@topgun.com
required: true
secrets:
git-repository-token:
description: Git repository authentication token.
required: true
jobs:
gha-gitops-manifest-update:
runs-on: ubuntu-latest
if: github.actor != 'dependabot[bot]'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
repository: ${{ inputs.git-repository }}
token: ${{ secrets.git-repository-token }}
#Note: below workflow code left in place to show how to access a local action from inside a reuseable workflow, i.e. messy!
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
# repository: f2calv/gha-workflows #Note: this repo name
# ref: ${{ github.ref_name }} #Note: assumes that the ref repo has an identical branch name to the calling branch
# path: workflows
- uses: f2calv/gha-gitops-manifest-update@v1
#uses: ./workflows/.github/actions/gha-gitops-manifest-update
with:
registry: ${{ inputs.registry }}
repository: ${{ inputs.repository }}
repository-prefix: ${{ inputs.repository-prefix }}
tag: ${{ inputs.tag }}
manifest: ${{ inputs.manifest }}
manifest-path: ${{ inputs.manifest-path }}
fullSemVer: ${{ inputs.fullSemVer }}
git-user-name: ${{ inputs.git-user-name }}
git-user-email: ${{ inputs.git-user-email }}