2023-12-20 17:21:31 +08:00
|
|
|
name: Update dependencies
|
|
|
|
on:
|
|
|
|
workflow_dispatch: {}
|
2024-05-09 23:41:59 +08:00
|
|
|
schedule:
|
2024-05-22 21:36:03 +08:00
|
|
|
- cron: "0 6 * * 0"
|
2023-12-20 17:21:31 +08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
check:
|
|
|
|
name: Check for updates
|
|
|
|
runs-on: ubuntu-latest
|
2023-12-29 04:20:28 +08:00
|
|
|
if: github.repository == 'ohmyzsh/ohmyzsh'
|
2023-12-20 17:21:31 +08:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
2024-05-12 18:30:22 +08:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2023-12-20 17:21:31 +08:00
|
|
|
- name: Authenticate as @ohmyzsh
|
2023-12-29 04:20:28 +08:00
|
|
|
id: generate_token
|
2023-12-20 17:21:31 +08:00
|
|
|
uses: ohmyzsh/github-app-token@v2
|
|
|
|
with:
|
2023-12-21 02:38:25 +08:00
|
|
|
app_id: ${{ secrets.OHMYZSH_APP_ID }}
|
|
|
|
private_key: ${{ secrets.OHMYZSH_APP_PRIVATE_KEY }}
|
2024-05-09 23:41:59 +08:00
|
|
|
- name: Setup Python
|
|
|
|
uses: actions/setup-python@v5
|
|
|
|
with:
|
|
|
|
python-version: "3.12"
|
|
|
|
cache: "pip"
|
2023-12-20 17:21:31 +08:00
|
|
|
- name: Process dependencies
|
|
|
|
env:
|
2023-12-29 04:20:28 +08:00
|
|
|
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
|
|
|
|
GIT_APP_NAME: ohmyzsh[bot]
|
|
|
|
GIT_APP_EMAIL: 54982679+ohmyzsh[bot]@users.noreply.github.com
|
|
|
|
TMP_DIR: ${{ runner.temp }}
|
2023-12-20 17:21:31 +08:00
|
|
|
run: |
|
2023-12-29 04:20:28 +08:00
|
|
|
pip install -r .github/workflows/dependencies/requirements.txt
|
2023-12-20 17:21:31 +08:00
|
|
|
python3 .github/workflows/dependencies/updater.py
|