auto update #204
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: auto update | |
on: | |
schedule: | |
# one day after simple-icons release PR is generated (https://crontab.guru/#0_0_*_*_1) | |
- cron: '0 0 * * 1' | |
workflow_dispatch: | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repository and submodules | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: configure credentials | |
uses: oleksiyrudenko/gha-git-credentials@v2-latest | |
with: | |
global: true | |
name: github-actions[bot] | |
email: 41898282+github-actions[bot]@users.noreply.github.com | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: setup Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: install Poetry | |
uses: snok/install-poetry@v1.4.1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
- name: load cached venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | |
- name: install dependencies | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction --no-root | |
- name: install library | |
run: poetry install -E auto-update --no-interaction | |
- name: run auto update | |
env: | |
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.POETRY_PYPI_TOKEN_PYPI }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: poetry run python scripts/auto-update.py |