Update terms #2
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 terms | |
on: | |
workflow_dispatch: {} | |
permissions: | |
contents: write | |
jobs: | |
update: | |
name: Python ${{ matrix.python-version }} on ${{ matrix.os }} | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
strategy: | |
matrix: | |
python-version: ["3.12"] | |
os: [ubuntu-latest] | |
steps: | |
- name: Checkout 🔔 | |
uses: actions/checkout@v4 | |
- name: Setup Python ${{ matrix.python-version }} 🐍 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Python Install dependencies 🧹 | |
run: pip3 install requests | |
- name: Update list 🔨 | |
run: python3 generate.py | |
- name: Push changes 🚀 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git add ./src/terms.json | |
git commit -m "Update products.json at `date +%Y-%m-%d`" -a | |
git push origin main | |
ci: | |
needs: [update] | |
uses: ./.github/workflows/ci.yml |