From a32a19b6a32858ec018d6ea2e1b383834e5e5fe4 Mon Sep 17 00:00:00 2001 From: Hamothy <58985301+sgoudham@users.noreply.github.com> Date: Sun, 20 Aug 2023 11:58:29 +0100 Subject: [PATCH] ci: ensure actions are fork-friendly (#176) --- .github/workflows/generate.yml | 5 ++++- .github/workflows/maintainers.yml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index fb8454f..077535d 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -13,11 +13,14 @@ jobs: generate-health-files: runs-on: ubuntu-latest name: Generate Health Files + permissions: + # Give the default GITHUB_TOKEN write permission to commit and push the + # added or changed files to the repository. + contents: write steps: - uses: actions/checkout@v3 with: - token: ${{ secrets.USERSTYLES_TOKEN }} ref: ${{ github.ref }} - name: Set up Deno diff --git a/.github/workflows/maintainers.yml b/.github/workflows/maintainers.yml index c616b92..ea5dee7 100644 --- a/.github/workflows/maintainers.yml +++ b/.github/workflows/maintainers.yml @@ -17,7 +17,6 @@ jobs: steps: - uses: actions/checkout@v3 with: - token: ${{ secrets.USERSTYLES_TOKEN }} ref: ${{ github.ref }} - name: Set up Deno @@ -32,6 +31,7 @@ jobs: path: ${{ env.DENO_DIR }} - name: Sync Maintainers + if: ${{ github.repository == 'catppuccin/userstyles' && github.ref == 'refs/heads/main' }} working-directory: src/generate run: ./syncMaintainers.ts env: