WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Fixes critical security vulnerabilities #155

Fixes critical security vulnerabilities

Fixes critical security vulnerabilities #155

Workflow file for this run

# This workflow verifies lib/main.js has latest changes from src/*.ts
on: pull_request
jobs:
check-lib:
name: Build main.js and diff on
runs-on: ${{ matrix.os }}
permissions:
contents: read
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
steps:
- name: Check out
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Validate build
run: |
npm ci
npm run build
- name: Check if main.js has differences
if: matrix.os != 'windows-latest'
run: echo "diff=$(git diff --ignore-space-at-eol --text lib/main.js | wc -l)" >> $GITHUB_ENV
- name: Check if main.js has differences
if: matrix.os == 'windows-latest'
run: echo "diff=$(git diff --ignore-space-at-eol --text lib/main.js | wc -l)" >> $env:GITHUB_ENV
# If main.js was different than expected, upload the actual version
- name: Upload actual main.js
if: ${{ env.diff > 0}}
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: main.js-${{ matrix.os }}
path: lib/main.js
final-check:
name: Check if main.js has differences on both Ubuntu and Windows
runs-on: ubuntu-latest
permissions:
contents: read
needs: check-lib
steps:
- name: Download artifact
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
- name: Check if both artifacts exist
run: |
ls -R
if [ -d "main.js-windows-latest" ] && [ -d "main.js-ubuntu-latest" ]; then
echo "main.js difference detected. Please check the artifacts for more details."
exit 1
fi