mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-16 19:00:07 +00:00
ci(dependencies): fix some envs and add requirements
This commit is contained in:
parent
ec74eb91bd
commit
46b24d4099
3 changed files with 11 additions and 6 deletions
11
.github/workflows/dependencies.yml
vendored
11
.github/workflows/dependencies.yml
vendored
|
@ -8,19 +8,22 @@ jobs:
|
||||||
check:
|
check:
|
||||||
name: Check for updates
|
name: Check for updates
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: github.repository == 'ohmyzsh/ohmyzsh'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
if: github.repository == 'ohmyzsh/ohmyzsh'
|
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Authenticate as @ohmyzsh
|
- name: Authenticate as @ohmyzsh
|
||||||
|
id: generate_token
|
||||||
uses: ohmyzsh/github-app-token@v2
|
uses: ohmyzsh/github-app-token@v2
|
||||||
with:
|
with:
|
||||||
app_id: ${{ secrets.OHMYZSH_APP_ID }}
|
app_id: ${{ secrets.OHMYZSH_APP_ID }}
|
||||||
private_key: ${{ secrets.OHMYZSH_APP_PRIVATE_KEY }}
|
private_key: ${{ secrets.OHMYZSH_APP_PRIVATE_KEY }}
|
||||||
- name: Process dependencies
|
- name: Process dependencies
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
|
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
|
||||||
TMP_DIR: ${{ env.RUNNER_TEMP }}
|
GIT_APP_NAME: ohmyzsh[bot]
|
||||||
|
GIT_APP_EMAIL: 54982679+ohmyzsh[bot]@users.noreply.github.com
|
||||||
|
TMP_DIR: ${{ runner.temp }}
|
||||||
run: |
|
run: |
|
||||||
gh auth login --with-token <<< "${GITHUB_TOKEN}"
|
pip install -r .github/workflows/dependencies/requirements.txt
|
||||||
python3 .github/workflows/dependencies/updater.py
|
python3 .github/workflows/dependencies/updater.py
|
||||||
|
|
2
.github/workflows/dependencies/requirements.txt
vendored
Normal file
2
.github/workflows/dependencies/requirements.txt
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
PyYAML~=6.0.1
|
||||||
|
requests~=2.31.0
|
4
.github/workflows/dependencies/updater.py
vendored
4
.github/workflows/dependencies/updater.py
vendored
|
@ -302,8 +302,8 @@ class Git:
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def add_and_commit(scope: str, version: str):
|
def add_and_commit(scope: str, version: str):
|
||||||
user_name = "ohmyzsh"
|
user_name = os.environ.get("GIT_APP_NAME")
|
||||||
user_email = "bot@ohmyz.sh"
|
user_email = os.environ.get("GIT_APP_EMAIL")
|
||||||
|
|
||||||
# Add all files to git staging
|
# Add all files to git staging
|
||||||
CommandRunner.run_or_fail(["git", "add", "-A", "-v"], stage="AddFiles")
|
CommandRunner.run_or_fail(["git", "add", "-A", "-v"], stage="AddFiles")
|
||||||
|
|
Loading…
Reference in a new issue