Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .devcontainer/rust/devcontainer-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"extensions": [
"mhutchie.git-graph@1.30.0",
"ms-vsliveshare.vsliveshare@1.0.5959",
"rust-lang.rust-analyzer@0.3.2761",
"rust-lang.rust-analyzer@0.3.2769",
"tamasfe.even-better-toml@0.21.2",
"usernamehw.errorlens@3.26.0"
"usernamehw.errorlens@3.28.0"
]
}
}
Expand Down
13 changes: 5 additions & 8 deletions .github/actions/update-vscode-extensions/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ outputs:
updated-dependencies:
description: JSON array with the names of the updated dependencies
value: ${{ steps.update-extensions.outputs.updated-dependencies }}
markdown-summary:
description: Markdown summary of update result
value: ${{ steps.update-extensions.outputs.markdown-summary }}
markdown-summary-file:
description: Path to a file containing the markdown summary of update result
value: ${{ steps.update-extensions.outputs.markdown-summary-file }}

runs:
using: composite
Expand All @@ -24,11 +24,8 @@ runs:
sudo npm install -g @vscode/vsce
shell: bash
- run: |
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "markdown-summary<<${EOF}" >> "${GITHUB_OUTPUT}"
echo "$(${GITHUB_ACTION_PATH}/update-vscode-extensions.sh ${INPUT_FILE})" >> "${GITHUB_OUTPUT}"
echo "${EOF}" >> "${GITHUB_OUTPUT}"

${GITHUB_ACTION_PATH}/update-vscode-extensions.sh ${INPUT_FILE}
echo "markdown-summary-file=${RUNNER_TEMP}/markdown-summary.md" >> "${GITHUB_OUTPUT}"
echo "updated-dependencies=$(cat updated-extensions.json)" >> "${GITHUB_OUTPUT}"
rm updated-extensions.json
id: update-extensions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,5 @@ EXTENSIONS=$(echo "[${EXTENSIONS::-1}]" | jq 'sort_by(. | ascii_downcase)')
echo $JSON | jq '.customizations.vscode.extensions = $extensions' --argjson extensions "$EXTENSIONS" > $FILE

echo "$UPDATE_DETAILS_MARKDOWN"
echo "$UPDATE_DETAILS_MARKDOWN" > "${RUNNER_TEMP}/markdown-summary.md"
echo "$UPDATED_EXTENSIONS_JSON" > updated-extensions.json
24 changes: 18 additions & 6 deletions .github/workflows/update-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Update Dependencies

on:
pull_request:
schedule:
- cron: "30 2 * * 0"
workflow_dispatch:
Expand All @@ -13,6 +14,7 @@ jobs:
name: Update APT Dependencies (🍨 ${{ 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
Expand All @@ -31,13 +33,15 @@ jobs:
- 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@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.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
Expand All @@ -50,6 +54,7 @@ jobs:
name: Update VS Code Extensions (🍨 ${{ matrix.flavor }}, ${{ matrix.file }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
flavor: ["cpp", "rust"]
file: ["devcontainer-metadata.json", "devcontainer.json"]
Expand All @@ -67,20 +72,27 @@ jobs:
id: update-extensions
with:
input-file: .devcontainer/${{ matrix.flavor }}/${{ matrix.file }}
- 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"
} >> pull-request-body.md
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@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.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: 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 }}
Expand Down
Loading
Loading