-
Notifications
You must be signed in to change notification settings - Fork 7
ci: fix update dependencies #1114
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
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
9b26d6f
ci: fix updating apt dependencies
rjaegers 7a3143f
ci: truncate release details for extension updates
rjaegers 06c71b8
ci: fix script error
rjaegers 041b38b
ci: minor script fixes
rjaegers 03e6010
ci: more script fixes
rjaegers e67d908
ci: more fixing
rjaegers 08cbea6
ci: minor refactor
rjaegers 79511c9
ci: different strategy
rjaegers 4e86f5c
ci: enable dry-run of update-dependencies jobs
rjaegers 093d594
Update .github/workflows/update-dependencies.yml
rjaegers 603c367
ci: revert copilot fix
rjaegers 4f7eca2
ci: additional fixes
rjaegers c911e41
Merge branch 'ci/fix-update-dependencies' of https://github.com/phili…
rjaegers 96018d6
ci: another another aproach
rjaegers a32cad4
ci: reduce script injection attack surface
rjaegers 8132ded
ci: don't add files to the workspace
rjaegers f9114f4
chore(deps, cpp): update mull-19 (#1115)
philips-software-forest-releaser[bot] 86a8ed8
Merge branch 'main' into ci/fix-update-dependencies
rjaegers cbf9234
Apply suggestion from @Copilot
rjaegers e612015
Apply suggestion from @rjaegers
rjaegers 4c473df
ci: shorten job names somewhat
rjaegers 0fca037
ci: processed review comment
rjaegers 8e8c3ca
ci: use secure temp files
rjaegers d025582
ci: process more review comments
rjaegers adbd4a8
ci: switch to date based comparison for release notes
rjaegers 770eb72
ci: give a visual cue of a dry-run
rjaegers File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,87 +1,100 @@ | ||
| --- | ||
| name: Update Dependencies | ||
| name: 📦 Update | ||
|
|
||
| on: | ||
| pull_request: | ||
| schedule: | ||
| - cron: "30 2 * * 0" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| update-apt-dependencies: | ||
| name: Update APT Dependencies (🍨 ${{ matrix.flavor }}) | ||
| name: ${{ github.event_name == 'pull_request' && '🧪' || '' }} OS (🍨 ${{ matrix.flavor }}) | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| flavor: ["base", "cpp", "rust"] | ||
| # Using our own container is required since we need all package sources | ||
| # set-up correctly. | ||
| container: ghcr.io/philips-software/amp-devcontainer-${{ matrix.flavor }}:edge | ||
| permissions: | ||
| contents: write # is needed by peter-evans/create-pull-request to create branches and push commits | ||
| pull-requests: write # is needed by peter-evans/create-pull-request to create a PR | ||
| steps: | ||
| - uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 | ||
| with: | ||
| egress-policy: audit | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: ./.github/actions/update-apt-packages | ||
| id: update-packages | ||
| with: | ||
| input-file: .devcontainer/${{ matrix.flavor }}/apt-requirements-*.json | ||
| input-file: .devcontainer/${{ matrix.flavor }}/apt-requirements*.json | ||
| - uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1 | ||
| id: token | ||
| if: github.event_name != 'pull_request' | ||
| with: | ||
| app-id: ${{ vars.FOREST_RELEASER_APP_ID }} | ||
| private-key: ${{ secrets.FOREST_RELEASER_APP_PRIVATE_KEY }} | ||
| - uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0 | ||
| if: github.event_name != 'pull_request' | ||
| with: | ||
| commit-message: "Update ${{ join(fromJson(steps.update-packages.outputs.updated-dependencies), ', ') }}" | ||
| branch: feature/amp-devcontainer-${{ matrix.flavor }}/update-apt-packages | ||
| title: "chore(deps, ${{ matrix.flavor }}): update ${{ join(fromJson(steps.update-packages.outputs.updated-dependencies), ', ') }}" | ||
| labels: dependencies,apt | ||
| token: ${{ steps.token.outputs.token }} | ||
| sign-commits: true | ||
|
|
||
| update-vscode-extensions: | ||
| name: Update VS Code Extensions (🍨 ${{ matrix.flavor }}, ${{ matrix.file }}) | ||
| name: ${{ github.event_name == 'pull_request' && '🧪' || '' }} Extensions (🍨 ${{ matrix.flavor }}, ${{ matrix.file }}) | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| flavor: ["cpp", "rust"] | ||
| file: ["devcontainer-metadata.json", "devcontainer.json"] | ||
| permissions: | ||
| contents: write # is needed by peter-evans/create-pull-request to create branches and push commits | ||
| pull-requests: write # is needed by peter-evans/create-pull-request to create a PR | ||
| steps: | ||
| - uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 | ||
| with: | ||
| egress-policy: audit | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: ./.github/actions/update-vscode-extensions | ||
| id: update-extensions | ||
| with: | ||
| input-file: .devcontainer/${{ matrix.flavor }}/${{ matrix.file }} | ||
| - name: Generate PR body | ||
rjaegers marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| run: | | ||
| { | ||
| echo "> [!NOTE]" | ||
| echo "> Before merging this PR, please conduct a manual test checking basic functionality of the updated plug-ins. There are limited automated tests for the VS Code Extension updates." | ||
| echo "" | ||
| cat "$MARKDOWN_SUMMARY_FILE" | ||
| } >> "${RUNNER_TEMP}/pull-request-body.md" | ||
rjaegers marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| env: | ||
| MARKDOWN_SUMMARY_FILE: ${{ steps.update-extensions.outputs.markdown-summary-file }} | ||
| - uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1 | ||
| id: token | ||
| if: github.event_name != 'pull_request' | ||
| with: | ||
| app-id: ${{ vars.FOREST_RELEASER_APP_ID }} | ||
| private-key: ${{ secrets.FOREST_RELEASER_APP_PRIVATE_KEY }} | ||
| - uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0 | ||
| if: github.event_name != 'pull_request' | ||
| with: | ||
| commit-message: "Update ${{ join(fromJson(steps.update-extensions.outputs.updated-dependencies), ', ') }} in ${{ matrix.file }}" | ||
| branch: feature/amp-devcontainer-${{ matrix.flavor }}/update-vscode-extensions-${{ matrix.file }} | ||
| body: | | ||
| > [!NOTE] | ||
| > Before merging this PR, please conduct a manual test checking basic functionality of the updated plug-ins. There are limited automated tests for the VS Code Extension updates. | ||
|
|
||
| ${{ steps.update-extensions.outputs.markdown-summary }} | ||
| body-path: ${{ runner.temp }}/pull-request-body.md | ||
| title: "chore(deps, ${{ matrix.flavor }}): update ${{ join(fromJson(steps.update-extensions.outputs.updated-dependencies), ', ') }} in ${{ matrix.file }}" | ||
| labels: dependencies,vscode-extensions | ||
| token: ${{ steps.token.outputs.token }} | ||
| sign-commits: true | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.