-
Notifications
You must be signed in to change notification settings - Fork 11
feat(github): add upgrade main workflow #33
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
6d2a6b6
dc0e91f
40a4a9a
303dd5d
bd57b13
1bd4afa
1607ea4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,122 @@ | ||
| name: upgrade-main | ||
|
|
||
| on: | ||
| workflow_dispatch: {} | ||
| schedule: | ||
| - cron: "0 0 * * *" | ||
|
|
||
| permissions: | ||
| actions: none | ||
| attestations: none | ||
| checks: none | ||
| contents: none | ||
| deployments: none | ||
| discussions: none | ||
| id-token: none | ||
| issues: none | ||
| models: none | ||
| packages: none | ||
| pages: none | ||
| pull-requests: none | ||
| repository-projects: none | ||
| security-events: none | ||
| statuses: none | ||
|
|
||
| jobs: | ||
| upgrade: | ||
| name: Upgrade | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| outputs: | ||
| patch_created: ${{ steps.create_patch.outputs.patch_created }} | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| ref: main | ||
|
|
||
| - name: Setup mise | ||
| uses: jdx/mise-action@6d1e696aa24c1aa1bcc1adea0212707c71ab78a8 # v3.6.1 | ||
| with: | ||
| cache: true | ||
|
|
||
| - name: Install tools | ||
| run: mise install | ||
|
|
||
| - name: Upgrade dependencies | ||
| run: mise upgrade --bump | ||
|
|
||
| - name: Find mutations | ||
| id: create_patch | ||
| run: |- | ||
| git add . | ||
| git diff --staged --patch --exit-code > repo.patch || echo "patch_created=true" >> $GITHUB_OUTPUT | ||
| shell: bash | ||
| working-directory: ./ | ||
|
|
||
| - name: Upload patch | ||
| if: steps.create_patch.outputs.patch_created | ||
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.4.0 | ||
| with: | ||
| name: repo.patch | ||
| path: repo.patch | ||
| overwrite: true | ||
|
|
||
| pr: | ||
| name: Create Pull Request | ||
| needs: upgrade | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| if: ${{ needs.upgrade.outputs.patch_created }} | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| ref: main | ||
|
|
||
| - name: Download patch | ||
| uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v4.1.7 | ||
| with: | ||
| name: repo.patch | ||
| path: ${{ runner.temp }} | ||
|
|
||
| - name: Apply patch | ||
| run: | | ||
| [ -s ${{ runner.temp }}/repo.patch ] && git apply ${{ runner.temp }}/repo.patch || echo "Empty patch. Skipping." | ||
|
|
||
| - name: Set git identity | ||
| run: |- | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
scottschreckengaust marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| - name: Create Pull Request | ||
| uses: peter-evans/create-pull-request@4320041ed380b20e97d388d56a7fb4f9b8c20e79 # v6 | ||
| with: | ||
| token: ${{ secrets.UPGRADE_MAIN_TOKEN }} | ||
| commit-message: |- | ||
| chore(deps): upgrade dependencies | ||
|
|
||
| Upgrades project dependencies. See details in [workflow run]. | ||
|
|
||
| [Workflow Run]: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
|
|
||
| ------ | ||
|
|
||
| *Automatically created by the "upgrade-main" workflow* | ||
| branch: github-actions/upgrade-main | ||
| title: "chore(deps): upgrade dependencies" | ||
| body: |- | ||
| Upgrades project dependencies. See details in [workflow run]. | ||
|
|
||
| [Workflow Run]: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
|
|
||
| ------ | ||
|
|
||
| *Automatically created by the "upgrade-main" workflow* | ||
| author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | ||
| committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | ||
|
Comment on lines
+119
to
+120
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does this need to be here also? Also, there may need to be an update to the pull request validation for users excluded from contribution statements.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See above
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please update the pull request lint workflow along with this PR to prevent validation failures: https://github.com/awslabs/agent-plugins/blob/main/.github/workflows/pull-request-lint.yml#L55
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done in bd57b13 |
||
| signoff: true | ||
| labels: dependencies | ||
Uh oh!
There was an error while loading. Please reload this page.