-
Notifications
You must be signed in to change notification settings - Fork 246
125 lines (111 loc) · 4.77 KB
/
bumpVersions.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
---
name: Bump versions
run-name: Bump ${{ inputs.update-type }} using alfresco-updatecli/${{ inputs.alfresco-updatecli-ref }}
on:
push:
paths:
- .github/workflows/bumpVersions.yml
- updatecli-matrix-targets.yaml
tags-ignore:
- '**'
workflow_dispatch:
inputs:
update-type:
description: 'Which dependencies to bump'
type: choice
options:
- charts
- values
alfresco-updatecli-ref:
description: "The version to use for alfresco/alfresco-updatecli configs"
type: string
default: master
env:
UPDATE_CLI_VERSION: v0.84.1
DEFAULT_BRANCH_NAME: master
jobs:
bump-charts-dependencies:
runs-on: ubuntu-latest
name: Helm charts dependencies
if: inputs.update-type == 'charts'
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
token: ${{ secrets.BOT_GITHUB_TOKEN }}
- name: Login to quay.io
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Install Updatecli
uses: updatecli/updatecli-action@704a64517239e0993c5e3bf6749a063b8f950d9f # v2.70.0
with:
version: ${{ env.UPDATE_CLI_VERSION }}
- run: updatecli apply
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
- name: Regenerate helm docs if necessary
uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
with:
pre-commit-args: helm-docs || true
skip_checkout: "true"
- name: Git Auto Commit
uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1
with:
commit_message: |
🛠 Updatecli pipeline charts bump
commit_user_name: ${{ vars.BOT_GITHUB_USERNAME }}
commit_user_email: ${{ vars.BOT_GITHUB_EMAIL }}
branch: ${{ github.ref_name == env.DEFAULT_BRANCH_NAME && 'updatecli-bump-helm' || github.ref_name }}
create_branch: ${{ github.ref_name == env.DEFAULT_BRANCH_NAME }}
push_options: ${{ github.ref_name == env.DEFAULT_BRANCH_NAME && '--force' || '' }}
bump-values-dependencies:
runs-on: ubuntu-latest
name: Image tags values dependencies
if: inputs.update-type == 'values'
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
token: ${{ secrets.BOT_GITHUB_TOKEN }}
- name: Install Updatecli
uses: updatecli/updatecli-action@704a64517239e0993c5e3bf6749a063b8f950d9f # v2.70.0
with:
version: ${{ env.UPDATE_CLI_VERSION }}
- name: Checkout updatecli configs
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: alfresco/alfresco-updatecli
ref: ${{ inputs.alfresco-updatecli-ref || env.DEFAULT_BRANCH_NAME }}
path: alfresco-updatecli
- name: Build manifest and run Updatecli pipelines
shell: bash
run: |
for i in {docker-compose,helm/*}/updatecli-matrix-targets.yaml; do
TARGET=$(basename $(dirname $i))
echo -e "\n###### Building UpdateCli manifest for ${TARGET}\n"
yq '. *? load("alfresco-updatecli/deployments/values/supported-matrix.yaml") | explode(.)' ${i} | tee ./${TARGET}_merged.yaml
updatecli apply -c alfresco-updatecli/deployments/uber-manifest.tpl -v ./${TARGET}_merged.yaml
done
env:
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }}
QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
UPDATECLI_GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
- name: Regenerate helm docs if necessary
uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
with:
pre-commit-args: helm-docs || true
skip_checkout: "true"
- name: Git Auto Commit
uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1
with:
commit_message: |
🛠 Updatecli pipeline values bump
commit_user_name: ${{ vars.BOT_GITHUB_USERNAME }}
commit_user_email: ${{ vars.BOT_GITHUB_EMAIL }}
branch: ${{ github.ref_name == env.DEFAULT_BRANCH_NAME && 'updatecli-bump-acs' || github.ref_name }}
create_branch: ${{ github.ref_name == env.DEFAULT_BRANCH_NAME }}
push_options: ${{ github.ref_name == env.DEFAULT_BRANCH_NAME && '--force' || '' }}