add dependency-update workflow template (fixes #683)#756
add dependency-update workflow template (fixes #683)#756Rimsha2535 wants to merge 21 commits intomainfrom
Conversation
|
The GitHub workflow code looked good, but it's always good test, so here are those tests done via Use cases:
Example PR: Like @ckunki said, we likely need to modify this text more to tell the user what to do. But it sounds like this would be done in a later effort. |
Co-authored-by: Christoph Kuhnke <christoph.kuhnke@exasol.com>
Co-authored-by: Christoph Kuhnke <christoph.kuhnke@exasol.com>
Co-authored-by: Christoph Kuhnke <christoph.kuhnke@exasol.com>
Co-authored-by: Christoph Kuhnke <christoph.kuhnke@exasol.com>
Co-authored-by: Christoph Kuhnke <christoph.kuhnke@exasol.com>
|
| status: '${{ job.status }}' | ||
| token: '${{ secrets.GITHUB_TOKEN }}' | ||
| notification_title: 'Dependency update for {repo} created a Pull Request' | ||
| status: '${{ job.status }}', |
There was a problem hiding this comment.
duplicate field
| status: '${{ job.status }}', |
| token: '${{ secrets.GITHUB_TOKEN }}' | ||
| notification_title: 'Dependency update for {repo} created a Pull Request' | ||
| status: '${{ job.status }}', | ||
| token: '${{ secrets.GITHUB_TOKEN }}', |
There was a problem hiding this comment.
duplicate field
| token: '${{ secrets.GITHUB_TOKEN }}', |
| notification_title: 'Dependency update for {repo} created a Pull Request' | ||
| status: '${{ job.status }}', | ||
| token: '${{ secrets.GITHUB_TOKEN }}', | ||
| notification_title: 'Dependency update for {repo} created a Pull Request', |
There was a problem hiding this comment.
duplicate field
| notification_title: 'Dependency update for {repo} created a Pull Request', |
|
|
||
| echo "pr_url=$PR_URL" >> "$GITHUB_OUTPUT" | ||
|
|
||
| pr_url=$(gh pr create \ |
There was a problem hiding this comment.
not needed
| pr_url=$(gh pr create \ |
| echo "pr_url=$PR_URL" >> "$GITHUB_OUTPUT" | ||
|
|
||
| pr_url=$(gh pr create \ | ||
| --base "$BASE_BRANCH" \ |
There was a problem hiding this comment.
not needed
| --base "$BASE_BRANCH" \ |
|
|
||
| pr_url=$(gh pr create \ | ||
| --base "$BASE_BRANCH" \ | ||
| --title "Update dependencies to fix vulnerabilities ($(date '+%Y-%m-%d'))" \ |
There was a problem hiding this comment.
not needed
| --title "Update dependencies to fix vulnerabilities ($(date '+%Y-%m-%d'))" \ |
| pr_url=$(gh pr create \ | ||
| --base "$BASE_BRANCH" \ | ||
| --title "Update dependencies to fix vulnerabilities ($(date '+%Y-%m-%d'))" \ | ||
| --body "Automated dependency update for \`poetry.lock\`.) |
There was a problem hiding this comment.
not needed
| --body "Automated dependency update for \`poetry.lock\`.) |
| --base "$BASE_BRANCH" \ | ||
| --title "Update dependencies to fix vulnerabilities ($(date '+%Y-%m-%d'))" \ | ||
| --body "Automated dependency update for \`poetry.lock\`.) | ||
| echo "pr_url=$pr_url" >> "$GITHUB_OUTPUT" |
There was a problem hiding this comment.
not needed
| echo "pr_url=$pr_url" >> "$GITHUB_OUTPUT" |
| echo "pr_url=$pr_url" >> "$GITHUB_OUTPUT" | ||
| This PR was created by the dependency update workflow after running: | ||
| - \`poetry run -- nox -s dependency:audit\` | ||
| - \`poetry update\`" |
There was a problem hiding this comment.
not needed
| - \`poetry update\`" |
| --body "Automated dependency update for \`poetry.lock\`.) | ||
| echo "pr_url=$pr_url" >> "$GITHUB_OUTPUT" | ||
| This PR was created by the dependency update workflow after running: | ||
| - \`poetry run -- nox -s dependency:audit\` |
There was a problem hiding this comment.
not needed
| - \`poetry run -- nox -s dependency:audit\` |
| --title "Update dependencies to fix vulnerabilities ($(date '+%Y-%m-%d'))" \ | ||
| --body "Automated dependency update for \`poetry.lock\`.) | ||
| echo "pr_url=$pr_url" >> "$GITHUB_OUTPUT" | ||
| This PR was created by the dependency update workflow after running: |
There was a problem hiding this comment.
not needed
| This PR was created by the dependency update workflow after running: |
| permissions: | ||
| contents: read | ||
|
|
||
| test-python-environment: |
There was a problem hiding this comment.
Why has this been removed, now?
There was a problem hiding this comment.
@ckunki Sorry, there was a merge conflict in that file and I think this line was accidentally removed while resolving it.
There was a problem hiding this comment.
Thanks, this shouldn't be removed. It's related to the PTB not fully supporting GitHub workflow changes.
So the poetry run -- nox -s workflow:generate -- all overwrites & we need to manually ensure it stays 😿
@Rimsha2535 lmk if you want to pair briefly on this one.



Fixes #683
Checklist
Note: If any of the items in the checklist are not relevant to your PR, just check the box.
For any Pull Request
Is the following correct:
When Changes Were Made
Did you:
When Preparing a Release
Have you:
Notes