Skip to content

chore(deps, embedded-cpp): update github.vscode-github-actions, github.vscode-pull-request-github, sonarsource.sonarlint-vscode in devcontainer.json #1288

chore(deps, embedded-cpp): update github.vscode-github-actions, github.vscode-pull-request-github, sonarsource.sonarlint-vscode in devcontainer.json

chore(deps, embedded-cpp): update github.vscode-github-actions, github.vscode-pull-request-github, sonarsource.sonarlint-vscode in devcontainer.json #1288

---
name: 📦 Update
on:
pull_request:
schedule:
- cron: "30 2 * * 0"
workflow_dispatch:
permissions: {}
jobs:
update-apt-dependencies:
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: read # peter-evans/create-pull-request inherits app permissions; so we only need contents: read here
steps:
- uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: ./.github/actions/update-apt-packages
id: update-packages
with:
input-file: .devcontainer/${{ matrix.flavor }}/apt-requirements*.json
- uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
id: token
if: github.event_name != 'pull_request'
with:
client-id: ${{ vars.FOREST_RELEASER_CLIENT_ID }}
private-key: ${{ secrets.FOREST_RELEASER_APP_PRIVATE_KEY }}
permission-contents: write
permission-pull-requests: write
- uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
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: ${{ github.event_name == 'pull_request' && '🧪' || '' }} Extensions (🍨 ${{ matrix.flavor }}, ${{ matrix.file }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
flavor: ["cpp", "embedded-cpp", "rust"]
file: ["devcontainer-metadata.json", "devcontainer.json"]
permissions:
contents: read # peter-evans/create-pull-request inherits app permissions; so we only need contents: read here
steps:
- uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
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
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"
env:
MARKDOWN_SUMMARY_FILE: ${{ steps.update-extensions.outputs.markdown-summary-file }}
- uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
id: token
if: github.event_name != 'pull_request'
with:
client-id: ${{ vars.FOREST_RELEASER_CLIENT_ID }}
private-key: ${{ secrets.FOREST_RELEASER_APP_PRIVATE_KEY }}
permission-contents: write
permission-pull-requests: write
- uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
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-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