Skip to content

Commit 96018d6

Browse files
committed
ci: another another aproach
1 parent c911e41 commit 96018d6

3 files changed

Lines changed: 8 additions & 10 deletions

File tree

.github/actions/update-vscode-extensions/action.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ outputs:
1111
updated-dependencies:
1212
description: JSON array with the names of the updated dependencies
1313
value: ${{ steps.update-extensions.outputs.updated-dependencies }}
14-
markdown-summary:
15-
description: Markdown summary of update result
16-
value: ${{ steps.update-extensions.outputs.markdown-summary }}
14+
markdown-summary-file:
15+
description: Path to a file containing the markdown summary of update result
16+
value: ${{ steps.update-extensions.outputs.markdown-summary-file }}
1717

1818
runs:
1919
using: composite
@@ -24,11 +24,8 @@ runs:
2424
sudo npm install -g @vscode/vsce
2525
shell: bash
2626
- run: |
27-
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
28-
echo "markdown-summary<<${EOF}" >> "${GITHUB_OUTPUT}"
29-
echo "$(${GITHUB_ACTION_PATH}/update-vscode-extensions.sh ${INPUT_FILE})" >> "${GITHUB_OUTPUT}"
30-
echo "${EOF}" >> "${GITHUB_OUTPUT}"
31-
27+
${GITHUB_ACTION_PATH}/update-vscode-extensions.sh ${INPUT_FILE}
28+
echo "markdown-summary-file=${RUNNER_TEMP}/markdown-summary.md" >> "${GITHUB_OUTPUT}"
3229
echo "updated-dependencies=$(cat updated-extensions.json)" >> "${GITHUB_OUTPUT}"
3330
rm updated-extensions.json
3431
id: update-extensions

.github/actions/update-vscode-extensions/update-vscode-extensions.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,5 @@ EXTENSIONS=$(echo "[${EXTENSIONS::-1}]" | jq 'sort_by(. | ascii_downcase)')
6464
echo $JSON | jq '.customizations.vscode.extensions = $extensions' --argjson extensions "$EXTENSIONS" > $FILE
6565

6666
echo "$UPDATE_DETAILS_MARKDOWN"
67+
echo "$UPDATE_DETAILS_MARKDOWN" > "${RUNNER_TEMP}/markdown-summary.md"
6768
echo "$UPDATED_EXTENSIONS_JSON" > updated-extensions.json

.github/workflows/update-dependencies.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ jobs:
7777
echo "> [!NOTE]"
7878
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."
7979
echo ""
80-
echo "$MARKDOWN_SUMMARY"
80+
cat "$MARKDOWN_SUMMARY_FILE"
8181
} >> pull-request-body.md
8282
env:
83-
MARKDOWN_SUMMARY: ${{ steps.update-extensions.outputs.markdown-summary }}
83+
MARKDOWN_SUMMARY_FILE: ${{ steps.update-extensions.outputs.markdown-summary-file }}
8484
- uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
8585
id: token
8686
if: github.event_name != 'pull_request'

0 commit comments

Comments
 (0)