-
Notifications
You must be signed in to change notification settings - Fork 12
43 lines (40 loc) · 1.53 KB
/
main.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
name: Check for dependency upgrades
on:
schedule:
- cron: '30 5 * * 0'
push:
branches:
- auto/dependency-update
jobs:
upgrade-dependencies:
name: Check for dependency upgrades
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Activate a virtual environment
run: python -m venv .venv && source .venv/bin/activate
- name: Install pip-upgrader
run: pip install pip-upgrader
- name: Update python dependencies
run: |
find ./docker -name requirements.txt -exec pip-upgrade {} --skip-package-installation -p all \;
- name: Update node dependencies
run: |
source .venv/bin/activate && \
pip install nodeenv && \
nodeenv -p && \
npm install -g npm-check-updates && \
find ./docker -name package.json -exec ncu --packageFile {} -u \;
- name: Push to designated branch
run: |
git config --global user.name "xmedr"
git config --global user.email "[email protected]"
git checkout auto/dependency-update
git add .
git commit -m "Update pypi and node dependencies"
git push origin auto/dependency-update
- name: Create pull request
run: |
gh pr create -B main -H auto/dependency-update --title 'Update cookiecutter dependencies' --body 'Created by Github action. Review changes to the cookiecutter dependencies and merge if stable.'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}