mirror of
https://github.com/lordfriky/web-cfw-loader.git
synced 2024-12-28 16:11:55 +00:00
37 lines
890 B
YAML
37 lines
890 B
YAML
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 'github-actions@users.noreply.github.com'
|
|
git add --all
|
|
git commit -am ":robot: Payloads updated automatically"
|
|
git push
|
|
else
|
|
echo "Commit not needed."
|
|
fi
|
|
|
|
|
|
|