Skip to content
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

Remove excess permissions from pages workflows #2597

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
15 changes: 9 additions & 6 deletions pages/astro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
Expand All @@ -31,6 +25,9 @@ env:
jobs:
build:
name: Build
permissions:
contents: read

runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -82,6 +79,12 @@ jobs:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
pages: write
id-token: write

runs-on: ubuntu-latest
name: Deploy
steps:
Expand Down
15 changes: 9 additions & 6 deletions pages/gatsby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
Expand All @@ -32,6 +26,9 @@ defaults:
jobs:
# Build job
build:
permissions:
contents: read

runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -89,6 +86,12 @@ jobs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
pages: write
id-token: write

runs-on: ubuntu-latest
needs: build
steps:
Expand Down
15 changes: 9 additions & 6 deletions pages/hugo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
Expand All @@ -29,6 +23,9 @@ defaults:
jobs:
# Build job
build:
permissions:
contents: read

runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.128.0
Expand Down Expand Up @@ -66,6 +63,12 @@ jobs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
pages: write
id-token: write

runs-on: ubuntu-latest
needs: build
steps:
Expand Down
15 changes: 9 additions & 6 deletions pages/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
Expand All @@ -24,6 +18,9 @@ concurrency:
jobs:
# Build job
build:
permissions:
contents: read

runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -43,6 +40,12 @@ jobs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
pages: write
id-token: write

runs-on: ubuntu-latest
needs: build
steps:
Expand Down
15 changes: 9 additions & 6 deletions pages/jekyll.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
Expand All @@ -29,6 +23,9 @@ concurrency:
jobs:
# Build job
build:
permissions:
contents: read

runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -56,6 +53,12 @@ jobs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
pages: write
id-token: write

runs-on: ubuntu-latest
needs: build
steps:
Expand Down
15 changes: 9 additions & 6 deletions pages/mdbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
Expand All @@ -27,6 +21,9 @@ concurrency:
jobs:
# Build job
build:
permissions:
contents: read

runs-on: ubuntu-latest
env:
MDBOOK_VERSION: 0.4.36
Expand All @@ -52,6 +49,12 @@ jobs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
pages: write
id-token: write

runs-on: ubuntu-latest
needs: build
steps:
Expand Down
15 changes: 9 additions & 6 deletions pages/nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
Expand All @@ -27,6 +21,9 @@ concurrency:
jobs:
# Build job
build:
permissions:
contents: read

runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -85,6 +82,12 @@ jobs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
pages: write
id-token: write

runs-on: ubuntu-latest
needs: build
steps:
Expand Down
15 changes: 9 additions & 6 deletions pages/nuxtjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
Expand All @@ -27,6 +21,9 @@ concurrency:
jobs:
# Build job
build:
permissions:
contents: read

runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -82,6 +79,12 @@ jobs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
pages: write
id-token: write

runs-on: ubuntu-latest
needs: build
steps:
Expand Down
13 changes: 7 additions & 6 deletions pages/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
Expand All @@ -27,6 +21,13 @@ jobs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
Loading