Update payloads #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
- name: Update payloads | |
run: | | |
chmod +x extras/update-payloads.sh | |
./extras/update-payloads.sh | |
- name: Commit changes if necessary | |
run: | | |
if [ "$UPDATE" == true ]; | |
then | |
echo 'Commiting changes!' | |
git config --global user.name 'GitHub Actions' | |
git config --global user.email '[email protected]' | |
git add --all | |
git commit -am ":robot: Payloads updated automatically" | |
git push | |
else | |
echo "Commit not needed." | |
fi | |