Skip to content

Test diff size (2) #2330

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 1 commit into from
Nov 3, 2024
Merged
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
11 changes: 3 additions & 8 deletions .github/workflows/dist-files-size-diff-comment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,12 @@ jobs:
dist-files-size-diff:
runs-on: ubuntu-latest
steps:
- name: Download dist-size-diff artifact
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: dist-size-diff
run-id: ${{ github.event.workflow_run.id }}

- name: Download pr-number artifact
uses: actions/download-artifact@v4
with:
name: pr-number
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Read pr-number artifact to env var
id: read-pr-number
Expand All @@ -31,4 +26,4 @@ jobs:
uses: marocchino/sticky-pull-request-comment@v2
with:
number: ${{ steps.read-pr-number.outputs.pr-number }}
path: ./dist-size-diff.md
path: ./diff.md
20 changes: 7 additions & 13 deletions .github/workflows/dist-files-size-diff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,21 +60,15 @@ jobs:
console.log(diff);

fs.writeFileSync(process.env.GITHUB_WORKSPACE + '/dist-size-diff.md', diff)

- name: Upload the diff
uses: actions/upload-artifact@v4
with:
name: dist-size-diff
path: ./dist-size-diff.md

- name: Save PR number
env:
PR_NUMBER: ${{ github.event.number }}
run: |
echo $PR_NUMBER > ./pr-number
- name: Upload the PR number
echo "${{ github.event.number }}" > pr-number

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: pr-number
path: ./pr-number
name: dist-size-diff
path: |
./diff.md
./pr-number