-
-
Notifications
You must be signed in to change notification settings - Fork 4
56 lines (46 loc) · 1.56 KB
/
auto-update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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