Skip to content

Update bucket

Update bucket #2818

Workflow file for this run

name: Update bucket
on:
schedule:
# Run every 2 hours
# https://crontab.guru/#0_*/2_*_*_*
- cron: "0 */2 * * *"
workflow_dispatch:
inputs:
force:
description: "Enter 'force' if you want to force a refresh"
required: false
default: ""
jobs:
update:
name: Update manifests
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Run autoupdate
uses: foosel/scoop-checkver-action@v1
with:
bucket: bucket
force: ${{ github.event.inputs.force }}
- name: Deploy changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
while read file; do
if [[ $file == bucket/* ]] && [[ $file == *.json ]]; then
version=$(cat $file | jq -r .version)
manifest=$(basename $file .json)
message="$manifest: Update to version $version"
git add "$file"
git commit -m "$message"
fi
done < <(git diff --name-only)
git push