-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (61 loc) · 1.68 KB
/
deploy.yml
File metadata and controls
63 lines (61 loc) · 1.68 KB
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
name: deploy
on:
workflow_dispatch:
inputs:
new-tag:
description: 'new image tag to deploy'
required: true
type: string
service-name:
description: 'name of the service to update'
required: true
type: choice
options:
- org
- fin
- finNarrator
- frontend
- zugferd
- keycloak
- azDocumentAi
environment:
description: 'name of the affected environment'
required: true
type: choice
options:
- dev
- demo
- prod
workflow_call:
inputs:
new-tag:
description: 'new image tag to deploy'
required: true
type: string
service-name:
description: 'name of the service to update'
required: true
type: string
environment:
description: 'name of the affected environment'
required: true
type: string
jobs:
update-tag:
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Pull latest changes with rebase
run: git pull --rebase origin main
- name: Update app version
uses: mikefarah/yq@v4.45.4
with:
cmd: |
yq e -i 'select(.spec.values.${{ inputs.service-name }}.image.tag = "${{ inputs.new-tag }}")' infrastructure/hopps/overlays/${{ inputs.environment }}/helm-release.yaml
- uses: stefanzweifel/git-auto-commit-action@v5.2.0
with:
commit_message: "🚀 deploy ${{ inputs.environment }}/${{ inputs.service-name }} to ${{ inputs.new-tag }}"
runs-on: ubuntu-latest