- Notifications
You must be signed in to change notification settings - Fork2
feat: adds automatic dependency update#78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
88669006316d4c61897e6799ce651a908b93f1f71a5006974b32185159065abf1aa995c7cde873cb379bFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| name: Dependency-Updater | ||
| on: | ||
| schedule: | ||
| - cron: "0 0 * * *" | ||
| workflow_dispatch: | ||
| jobs: | ||
| dependency_updater: | ||
| name: Dependency-Updater | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| - name: Install Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.8" | ||
| - name: Poetry Python dependeny updater | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| run: | | ||
| git config --global user.name "SDK Releaser Bot" | ||
| git config --global user.email "noreply@stackit.de" | ||
| pip install poetry | ||
| make update-dependencies | ||
| for file in $(git diff --name-only | grep poetry.lock); do | ||
| # Extract the service for which the dependencies have been updated | ||
| dirpath=$(dirname $file) | ||
| pr_name=$(echo "Dependency Updater: ${dirpath}") | ||
| # Check if a PR already exists for the package | ||
| if gh pr list --state open | grep -q "${pr_name}"; then | ||
| echo "Pr for $dirpath already exists. Skipping." | ||
| else | ||
| # Create PR | ||
| branch_name="dependency-updater-$dirpath" | ||
| git checkout -b "$branch_name" | ||
| git add "$file" | ||
| git commit -m "chore: dependency update" | ||
| git push --set-upstream origin "$branch_name" | ||
| echo $(git status) | ||
| gh pr create --title "$pr_name" --body "Automated dependency update" --base "main" | ||
| git checkout main | ||
| fi | ||
| done | ||
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.