Skip to content

armgit / Pake

Public Imported from GitHub
0

Turn any website into a lightweight desktop app with one command, on macOS, Windows and Linux.

ci: give every job the scope it needs instead of the write default

Tw9313bcd6429f8f
diff --git a/.github/workflows/pake-cli.yaml b/.github/workflows/pake-cli.yaml
index 98bc7a2e..0af40f90 100644
--- a/.github/workflows/pake-cli.yaml
+++ b/.github/workflows/pake-cli.yaml
@@ -68,6 +68,10 @@ on:
required: false
default: "deb"
+# Builds an app on demand for anyone who runs it; it writes nothing.
+permissions:
+ contents: read
+
jobs:
build:
name: ${{ inputs.platform }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 1ff92f42..bb4cb8b9 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -30,6 +30,8 @@ concurrency:
jobs:
# Build and release popular apps
release-apps:
+ permissions:
+ contents: read
if: |
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) ||
(github.event_name == 'workflow_dispatch' && inputs.release_apps)
@@ -61,6 +63,8 @@ jobs:
skipIfReleaseExists: true
build-cli:
+ permissions:
+ contents: read
name: Build CLI
needs: release-apps
if: needs.release-apps.result == 'success'
@@ -85,6 +89,8 @@ jobs:
retention-days: 1
build-popular-apps:
+ permissions:
+ contents: write
name: ${{ matrix.config.title }}
needs: [release-apps, build-cli, create-release]
if: |
diff --git a/.github/workflows/single-app.yaml b/.github/workflows/single-app.yaml
index 5c6f2018..b110c44c 100644
--- a/.github/workflows/single-app.yaml
+++ b/.github/workflows/single-app.yaml
@@ -102,6 +102,11 @@ on:
PAKE_NOTARIZE_PASSWORD:
required: false
+# Called by release.yml. Its build job creates releases with ncipollo,
+# so contents: write is the scope it genuinely needs, not the repo default.
+permissions:
+ contents: write
+
jobs:
build:
name: ${{ inputs.title }} (${{ matrix.build }})