Skip to content

Commit

Permalink
Update workflows based on zizmor audit
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed Dec 25, 2024
1 parent 271c3fa commit 55c4659
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 19 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
persist-credentials: false
- name: Install Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af
with:
node-version: 20.x
cache: 'npm'
Expand All @@ -25,7 +27,7 @@ jobs:
- name: Build standalone
run: npm run build-standalone-prod
- name: Upload standalone artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b
with:
name: standalone
path: dist/standalone.html
20 changes: 10 additions & 10 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ on:
push:
branches: [master]

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "deploy"
cancel-in-progress: true
Expand All @@ -19,12 +14,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
persist-credentials: false
- name: Setup GitHub Pages
id: pages
uses: actions/configure-pages@v4
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b
- name: Install Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af
with:
node-version: 20.x
cache: 'npm'
Expand All @@ -44,17 +41,20 @@ jobs:
npm run build-standalone-prod
cp dist/standalone.html web
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa
with:
path: ./web/

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e
12 changes: 7 additions & 5 deletions .github/workflows/generate-electron-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
persist-credentials: false
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af
with:
node-version: 20.x
- name: Install dependencies
Expand All @@ -31,7 +33,7 @@ jobs:
node generate-macos.js
- name: Upload macOS
if: runner.os == 'macOS'
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b
with:
name: electron-macos
path: electron-bin/temp/macos/*.zip
Expand All @@ -46,13 +48,13 @@ jobs:
node generate-windows.js
- name: Upload Windows
if: runner.os == 'Windows'
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b
with:
name: electron-windows
path: electron-bin/temp/windows/*.zip
- name: Upload Windows Crossbuild
if: runner.os == 'Linux'
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b
with:
name: electron-windows-crossbuild
path: electron-bin/temp/windows/*.zip
4 changes: 3 additions & 1 deletion .github/workflows/wkwebview-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ jobs:
runs-on: macos-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
persist-credentials: false
- name: Build
run: |
cd wkwebview
Expand Down

0 comments on commit 55c4659

Please sign in to comment.