-
Notifications
You must be signed in to change notification settings - Fork 5
122 lines (107 loc) · 4.1 KB
/
update-dependencies.yaml
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
# This workflow proposes updates to the dependencies that dependabot cannot
name: Update dependencies
on:
# Allow manual executions
workflow_dispatch:
# Run nightly
schedule:
- cron: '0 0 * * *'
jobs:
propose_github_release_updates:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- key: ansible.posix
path: ./requirements.yml
repository: ansible-collections/ansible.posix
tags: "yes"
version_jsonpath: collections[0].version
component: ansible
- key: community.general
path: ./requirements.yml
repository: ansible-collections/community.general
version_jsonpath: collections[1].version
component: ansible
- key: containers.podman
path: ./requirements.yml
repository: containers/ansible-podman-collections
tags: "yes"
version_jsonpath: collections[2].version
component: ansible
- key: prometheus.prometheus
path: ./requirements.yml
repository: prometheus-community/ansible
version_jsonpath: collections[3].version
component: ansible
- key: grafana
path: ./ansible/roles/linux-monitoring/defaults/main.yml
repository: grafana/grafana
version_jsonpath: grafana_version
component: monitoring
regex: "\\d+\\.\\d+\\.\\d+"
- key: guacamole
path: ./ansible/roles/linux-guacamole/defaults/main.yml
repository: apache/guacamole-server
tags: "yes"
version_jsonpath: guacamole_version
component: guacamole
- key: nginx
path: ./ansible/roles/linux-guacamole/defaults/main.yml
repository: nginxinc/docker-nginx
tags: "yes"
version_jsonpath: guacamole_nginx_image_tag
component: guacamole
- key: prometheus
path: ./ansible/roles/linux-monitoring/defaults/main.yml
repository: prometheus/prometheus
version_jsonpath: prometheus_version
component: monitoring
- key: zenith-client
path: ./ansible/roles/linux-zenith-client/defaults/main.yml
repository: azimuth-cloud/zenith
prereleases: "yes"
version_jsonpath: zenith_client_image_tag
component: zenith-client
name: ${{ matrix.key }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check for most recent GitHub release
id: next
uses: azimuth-cloud/github-actions/github-latest-release@master
with:
repository: ${{ matrix.repository }}
regex: ${{ matrix.regex || '' }}
tags: ${{ matrix.tags || 'no' }}
prereleases: ${{ matrix.prereleases || 'no' }}
- name: Update dependency key
uses: azimuth-cloud/github-actions/config-update@master
with:
path: ${{ matrix.path }}
updates: |
${{ matrix.version_jsonpath }}=${{ steps.next.outputs.version }}
- name: Generate app token for PR
uses: azimuth-cloud/github-actions/generate-app-token@master
id: generate-app-token
with:
repository: ${{ github.repository }}
app-id: ${{ secrets.AUTOMATION_APP_ID }}
app-private-key: ${{ secrets.AUTOMATION_APP_PRIVATE_KEY }}
- name: Propose changes via PR if required
uses: peter-evans/create-pull-request@v6
with:
token: ${{ steps.generate-app-token.outputs.token }}
commit-message: >-
Bump ${{ matrix.key }} to ${{ steps.next.outputs.version }}
branch: update-dependency/${{ matrix.key }}
delete-branch: true
title: >-
Bump ${{ matrix.key }} to ${{ steps.next.outputs.version }}
body: >
This PR was created automatically to update
${{ matrix.key }} to ${{ steps.next.outputs.version }}.
labels: |
automation
dependency-update
${{ matrix.component }}