Skip to content

Run Updatecli Checks #112

Run Updatecli Checks

Run Updatecli Checks #112

Workflow file for this run

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