2023-05-09 22:42:09 +00:00
|
|
|
name: Update payloads
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
schedule:
|
|
|
|
- cron: "0 3 * * 5" # 3:00 am on fridays
|
|
|
|
jobs:
|
|
|
|
Update-Payloads:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Install jq
|
|
|
|
run: sudo apt install -y jq
|
|
|
|
|
2023-05-18 06:14:19 +00:00
|
|
|
- name: Update payloads
|
2023-06-03 07:07:57 +00:00
|
|
|
run: |
|
|
|
|
chmod +x extras/update-payloads.sh
|
|
|
|
./extras/update-payloads.sh
|
2023-05-09 22:42:09 +00:00
|
|
|
|
|
|
|
- name: Commit changes if necessary
|
|
|
|
run: |
|
2023-05-18 06:14:19 +00:00
|
|
|
if [ "$UPDATE" == true ];
|
2023-05-09 22:42:09 +00:00
|
|
|
then
|
2023-05-18 06:14:19 +00:00
|
|
|
echo 'Commiting changes!'
|
2023-05-09 22:42:09 +00:00
|
|
|
git config --global user.name 'GitHub Actions'
|
|
|
|
git config --global user.email 'github-actions@users.noreply.github.com'
|
|
|
|
git add --all
|
|
|
|
git commit -am ":robot: Payloads updated automatically"
|
|
|
|
git push
|
2023-05-18 06:14:19 +00:00
|
|
|
else
|
|
|
|
echo "Commit not needed."
|
2023-05-09 22:42:09 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|