mirror of
https://github.com/benjaminjacobreji/standardnotes-extensions.git
synced 2026-02-03 02:44:00 +08:00
53 lines
1.8 KiB
YAML
53 lines
1.8 KiB
YAML
name: Update Extensions to their lastest version
|
|
on:
|
|
schedule:
|
|
# ┌───────────── minute (0 - 59)
|
|
# │ ┌───────────── hour (0 - 23)
|
|
# │ │ ┌───────────── day of the month (1 - 31)
|
|
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
|
|
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
|
|
# │ │ │ │ │
|
|
# │ │ │ │ │
|
|
# │ │ │ │ │
|
|
# * * * * *
|
|
- cron: '0 0 * * *'
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
workflow_dispatch:
|
|
|
|
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
|
jobs:
|
|
update:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout@v2
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup-Python@v2
|
|
uses: actions/setup-python@v2
|
|
|
|
- name: Install Dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
|
|
- name: Update Extensions
|
|
run: python update.py
|
|
|
|
- name: Commit Changes
|
|
shell: bash
|
|
run: |
|
|
git config --global user.name '${{ github.actor }}'
|
|
git config --global user.email '${{ github.actor }}@users.noreply.github.com'
|
|
git status
|
|
if [ -n "$(git status --porcelain)" ]; then
|
|
git add -A
|
|
git commit -m "GitHub Action: update-extensions"
|
|
git fetch origin main
|
|
git push origin HEAD:main
|
|
else
|
|
echo "No extension updates. Exiting... ";
|
|
fi
|