Skip to content

ci: harden #1695

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

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
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
branches: [main]
paths-ignore: ["docs/**"]

permissions:
id-token: write

jobs:
build:
if: github.repository == 'catppuccin/userstyles'
Expand All @@ -18,7 +21,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.USERSTYLES_TOKEN }}
persist-credentials: false

- name: Setup Deno
uses: nekowinston/setup-deno@main
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
push:
branches: [main]

permissions:
contents: write
pull-requests: write

jobs:
ci:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -59,4 +63,6 @@ jobs:
push: false

- name: Push changes
run: git push origin "HEAD:${{ github.ref }}" --atomic
run: git push origin "HEAD:$REF" --atomic
env:
REF: ${{ github.ref }}
4 changes: 4 additions & 0 deletions .github/workflows/deno-check.yml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes don't seem to be warranted given the scope of the file?

Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@ on:
branches: [main]
paths: ["**/*.ts"]

permissions: {}

jobs:
check:
if: github.repository == 'catppuccin/userstyles'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Deno
uses: nekowinston/setup-deno@main
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/deno-lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches: [main]
paths: ["deno.json"]

permissions:
contents: write
Comment on lines +8 to +9
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this change and why is it necessary?


jobs:
deno-lock:
name: Update Deno lock
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
issues:
types: [opened, edited]

permissions: {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't seem necessary?


jobs:
triage:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/lint.yml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes don't seem necessary given workflow's scope.

Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@ on:
branches: [main]
paths-ignore: ["docs/**"]

permissions: {}

jobs:
lint:
if: github.repository == 'catppuccin/userstyles'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Deno
uses: nekowinston/setup-deno@main
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/maintainers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@ on:
branches: [main]
paths: ["scripts/userstyles.yml"]

permissions: {}

jobs:
sync-maintainers:
if: github.repository == 'catppuccin/userstyles'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Deno
uses: nekowinston/setup-deno@main
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/pull-requests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
name: Pull Request Labeler

on:
pull_request_target:
pull_request:

permissions:
pull-requests: write
contents: read

jobs:
triage:
Expand All @@ -10,6 +14,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Add pull request labels
uses: actions/[email protected]
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/sync-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
branches: [main]
paths: [".github/labels.yml"]

permissions: {}

jobs:
sync:
if: github.repository == 'catppuccin/userstyles'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
branches: [main]
paths: ["scripts/userstyles.yml"]

permissions: {}

jobs:
deploy:
if: github.repository == 'catppuccin/userstyles'
Expand Down