-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (53 loc) · 1.69 KB
/
promote-to-dev.yaml
File metadata and controls
59 lines (53 loc) · 1.69 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
name: Promote to production
on:
workflow_call:
inputs:
runs_on:
required: false
type: string
default: ubuntu-latest
timeout_minutes:
required: false
type: number
default: 30
image_tag:
required: true
type: string
description: Image tag for production
image_name:
required: true
type: string
description: Application name
secrets:
app_id:
required: true
app_private_key:
required: true
jobs:
promote-to-dev:
runs-on: "${{ inputs.runs_on }}"
steps:
- name: Generate a token
id: generate-token
uses: getsentry/action-github-app-token@v2
with:
app_id: ${{ secrets.app_id }}
private_key: ${{ secrets.app_private_key }}
- name: Install yq
run: sudo wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq && sudo chmod +x /usr/bin/yq
- name: Checkout helm-configuration repository
uses: actions/checkout@v4
with:
fetch-depth: 0
repository: propeller-heads/helm-configuration
ref: main
token: ${{ steps.generate-token.outputs.token }}
- name: Replace release version
run: |
yq eval '.${{ inputs.image_name }}.tag="${{ inputs.image_tag }}"' -i helmwave/dev/versions.yml
- name: Commit & Push changes
uses: actions-js/push@master
with:
github_token: ${{ steps.generate-token.outputs.token }}
message: Update version of ${{ inputs.image_name }} with tag ${{ inputs.image_tag }}
repository: propeller-heads/helm-configuration