-
-
Notifications
You must be signed in to change notification settings - Fork 35
217 lines (204 loc) · 6 KB
/
auto-update-packages.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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
#
# This workflow was created automatically from the `auto-update-template.yml` by running `make -C .github auto-update-workflow`
# DO NOT EDIT THIS WORKFLOW
#
name: "auto-update-packages"
on:
workflow_dispatch:
schedule:
# See cron format at https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#scheduled-events
# Update packages 5am and 4pm PST
- cron: '0 0,13 * * *'
jobs:
auto-update:
runs-on: ubuntu-latest
strategy:
# do not let 1 failure stop the other jobs from proceeding
fail-fast: false
matrix:
package-name:
- amazon-ecr-credential-helper
- amtool
- argocd
- assume-role
- atlantis
- atmos
- awless
- aws-copilot-cli
- aws-iam-authenticator
- aws-nuke
- aws-vault
- cfssl
- cfssljson
- chamber
- cilium-cli
- cli53
- cloud-nuke
- cloudflared
- codefresh
- conftest
- ctop
- direnv
- doctl
- ec2-instance-selector
- ecspresso
- emailcli
- envcli
- fetch
- figurine
- fzf
- gh
- ghr
- github-commenter
- github-release
- github-status-updater
- gitleaks
- go-jsonnet
- gomplate
- gonsul
- goofys
- gosu
- grpcurl
- hcledit
- helm
- helm2
- helm3
- helmfile
- htmltest
- hugo
- infracost
- jp
- json2hcl
- jx
- k3d
- k6
- k9s
- katafygio
- kfctl
- kind
- kops
- kubecron
- kubectl
- kubectl-1.20
- kubectl-1.21
- kubectl-1.22
- kubectl-1.23
- kubectl-1.24
- kubectl-1.25
- kubectl-1.26
- kubectl-1.27
- kubectl-1.28
- kubectl-1.29
- kubectl-1.30
- kubectl-1.31
- kubectx
- kubens
- kubeval
- lazydocker
- lectl
- minikube
- misspell
- opa
- pack
- pandoc
- pgmetrics
- pluto
- popeye
- promtool
- rainbow-text
- rakkess
- rancher
- rbac-lookup
- saml2aws
- sentry-cli
- shellcheck
- shfmt
- slack-notifier
- sops
- spacectl
- spotctl
- sshm
- stern
- sudosh
- teleport
- terraform-0.14
- terraform-0.15
- terraform-config-inspect
- terraform-docs
- terraform-module-versions
- terragrunt
- terrahelp
- tflint
- tfschema
- tfsec
- thanos
- trivy
- variant
- variant2
- velero
- vendir
- venona
- vert
- yajsv
- yq
steps:
- uses: actions/checkout@v4
# Use updated `go` version because some packages are compiled or fetched with `go`
- uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Get current package information
shell: bash
id: current
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: |
make -C vendor/${{matrix.package-name}} info/github
- name: Update packages
shell: bash
id: update
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: |
make -C vendor/${{matrix.package-name}} auto-update
make -C vendor/${{matrix.package-name}} info/github
- name: Update readme
shell: bash
id: readme
if: steps.update.outputs.package_version != steps.current.outputs.package_version
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: |
make init
make readme/deps
make readme
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
if: steps.update.outputs.package_version != steps.current.outputs.package_version
with:
token: ${{ secrets.GITHUB_BOT_TOKEN }}
committer: 'cloudpossebot <[email protected]>'
author: 'cloudpossebot <[email protected]>'
commit-message: Update ${{ steps.update.outputs.package_name }} to ${{ steps.current.outputs.package_version }} → ${{ steps.update.outputs.package_version }}
title: Update ${{ steps.update.outputs.package_name }} to ${{ steps.update.outputs.package_version }}
body: |-
## what
This is an auto-generated PR that updates the ${{ steps.update.outputs.package_name }} package version.
| Meta | Details |
|:------------------|:---------------------------------------------|
| **Package Name** | `${{ steps.update.outputs.package_name }}` |
| **Vendor** | [${{ steps.update.outputs.vendor }}](${{ steps.update.outputs.package_homepage_url }}) |
| **Version** | ${{ steps.update.outputs.package_version }} |
| **License** | ${{ steps.update.outputs.package_license }} |
| **Repo** | ${{ steps.update.outputs.package_repo_url }} |
| **Arch** | ${{ steps.update.outputs.arch }} |
| **OS** | ${{ steps.update.outputs.os }} |
| **Download URL** | ${{ steps.update.outputs.download_url }} |
## why
Publish the latest release of `${{ steps.update.outputs.package_name }}` to our package repository.
branch: auto-update/${{ steps.update.outputs.package_name }}-${{ steps.update.outputs.package_version }}
base: main
delete-branch: true
labels: |
auto-update
vendor/${{ steps.update.outputs.package_name }}