-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (45 loc) · 1.27 KB
/
updatecli.yml
File metadata and controls
51 lines (45 loc) · 1.27 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
name: Run Updatecli Checks
on:
workflow_dispatch:
push:
branches:
- main
paths:
- .update.d/**
schedule:
# Run once a day at 4:10am
- cron: "10 4 * * *"
permissions:
contents: write
pull-requests: write
jobs:
updatecli:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout
# https://github.com/actions/checkout
uses: actions/checkout@v4
- name: Install Updatecli in the runner
# https://github.com/updatecli/updatecli-action
uses: updatecli/updatecli-action@v2
with:
# version that contains our HTTP POST fixes
version: v0.111.0-rc.2
- name: Updatecli Apply
if: github.ref == 'refs/heads/main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "### Applying updates" > $GITHUB_STEP_SUMMARY
for FILE in $(grep -v '^#' .update.d/checks.lst); do
echo "- ${FILE}" >> $GITHUB_STEP_SUMMARY
echo "::group::${FILE}"
updatecli apply \
--config ".update.d/${FILE}"
RESULT=$?
echo "::endgroup::"
[ $RESULT == 0 ] || { echo "::error file=${FILE}::Failed to process ${FILE}"; }
done