-
Notifications
You must be signed in to change notification settings - Fork 4
70 lines (62 loc) · 2.59 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
---
name: Bump versions
run-name: Bump using alfresco-updatecli/${{ inputs.alfresco-updatecli-ref || 'master' }}
on:
pull_request:
branches:
- main
paths:
- .github/workflows/bumpVersions.yml
- .github/updatecli.tpl
workflow_dispatch:
inputs:
alfresco-updatecli-ref:
description: "The version to use for alfresco/alfresco-updatecli configs"
type: string
default: master
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name || github.run_id }}
cancel-in-progress: true
env:
DEFAULT_BRANCH_NAME: main
jobs:
build:
runs-on: ubuntu-latest
name: Bump versions
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.head_ref || github.ref_name }}
token: ${{ secrets.BOT_GITHUB_TOKEN }}
- name: Install Updatecli
uses: updatecli/updatecli-action@11d8c3e7c4dbb188d9534e599db759e418911828 # v2.73.0
- name: Checkout updatecli configs
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: alfresco/alfresco-updatecli
ref: ${{ inputs.alfresco-updatecli-ref || '086e51db36050f0321572010f9e936c268027d96' }}
path: alfresco-updatecli
- name: Updatecli apply
shell: bash
run: |
set +xe
for i in */artifacts-*.yaml; do
updatecli apply -c .github/updatecli.tpl -v ${i} -v .github/updatecli_values.yaml -v alfresco-updatecli/deployments/values/supported-matrix.yaml
updatecli apply -c .github/updatecli_amps.tpl -v ${i} -v .github/updatecli_amps_values.yaml
done
env:
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
UPDATECLI_GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
UPDATECLI_GITHUB_USERNAME: ${{ vars.BOT_GITHUB_USERNAME}}
- name: Git Auto Commit
uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1
with:
commit_message: |
🛠 Updatecli pipeline artifacts 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-versions' || github.head_ref || github.ref_name }}
create_branch: ${{ github.ref_name == env.DEFAULT_BRANCH_NAME }}
push_options: ${{ github.ref_name == env.DEFAULT_BRANCH_NAME && '--force' || '' }}