From f36102df9e037d3aa2aa56a85a1c54c6fcc1f5bf Mon Sep 17 00:00:00 2001 From: uncenter <47499684+uncenter@users.noreply.github.com> Date: Fri, 13 Oct 2023 01:24:11 -0400 Subject: [PATCH] ci: bump actions and ensure consistent naming (#263) --- .github/workflows/file-checker.yml | 6 +++--- .github/workflows/format.yml | 12 ++++++------ .github/workflows/generate.yml | 17 +++++++---------- .github/workflows/issues.yml | 2 +- .github/workflows/maintainers.yml | 6 +++--- .github/workflows/pull-requests.yml | 4 ++-- .github/workflows/typos.yml | 10 +++++----- 7 files changed, 27 insertions(+), 30 deletions(-) diff --git a/.github/workflows/file-checker.yml b/.github/workflows/file-checker.yml index 9050e5e1..85b818d2 100644 --- a/.github/workflows/file-checker.yml +++ b/.github/workflows/file-checker.yml @@ -6,12 +6,12 @@ on: jobs: file-checker: - name: Required Files Included + name: Required files included runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Check Files + - uses: actions/checkout@v4 + - name: Check files run: | MISSING_FILES=0 echo "# Missing Files Found 😢" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 28f49dba..a9ddb22b 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -1,25 +1,25 @@ -name: Prettier +name: Format on: push: branches: [main] jobs: - prettier: + format: name: Format Code runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: token: ${{ secrets.USERSTYLES_TOKEN }} - uses: actions/setup-node@v3 - - name: Run Prettier + - name: Format files run: npx prettier --write styles/**/*.css - - name: Push Changes - uses: stefanzweifel/git-auto-commit-action@v4 + - name: Push changes + uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "style: format code with prettier" commit_author: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>" diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index 4e3b7d8e..670fb008 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -13,27 +13,24 @@ env: jobs: generate-health-files: runs-on: ubuntu-latest - name: Generate Health Files + 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: - - name: Check Out Repository - uses: actions/checkout@v3 + - uses: actions/checkout@v4 if: env.HAS_USERSTYLES_TOKEN with: token: ${{ secrets.USERSTYLES_TOKEN }} ref: ${{ github.ref }} - - - name: Check Out Repository (Fork) - uses: actions/checkout@v3 + - uses: actions/checkout@v4 if: env.HAS_USERSTYLES_TOKEN == 'false' with: ref: ${{ github.ref }} - - name: Set up Deno + - name: Setup Deno uses: denoland/setup-deno@v1 with: deno-version: v1.x @@ -44,12 +41,12 @@ jobs: key: ${{ hashFiles('src/generate/deno.lock') }} path: ${{ env.DENO_DIR }} - - name: Update Health Files + - name: Generate health files working-directory: src/generate run: ./generate.ts - - name: Push Changes - uses: stefanzweifel/git-auto-commit-action@v4 + - name: Push changes + uses: stefanzweifel/git-auto-commit-action@v5 if: ${{ github.repository == 'catppuccin/userstyles' && github.ref == 'refs/heads/main' && env.HAS_USERSTYLES_TOKEN }} with: commit_message: "chore: generate health files" diff --git a/.github/workflows/issues.yml b/.github/workflows/issues.yml index 4b3365ed..9b22cb72 100644 --- a/.github/workflows/issues.yml +++ b/.github/workflows/issues.yml @@ -7,7 +7,7 @@ on: jobs: triage: - name: Add Labels + name: Add labels runs-on: ubuntu-latest steps: diff --git a/.github/workflows/maintainers.yml b/.github/workflows/maintainers.yml index ea5dee7b..b233243c 100644 --- a/.github/workflows/maintainers.yml +++ b/.github/workflows/maintainers.yml @@ -12,10 +12,10 @@ env: jobs: sync-maintainers: runs-on: ubuntu-latest - name: Sync Maintainers + name: Sync maintainers steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: ${{ github.ref }} @@ -30,7 +30,7 @@ jobs: key: ${{ hashFiles('src/generate/deno.lock') }} path: ${{ env.DENO_DIR }} - - name: Sync Maintainers + - name: Sync maintainers if: ${{ github.repository == 'catppuccin/userstyles' && github.ref == 'refs/heads/main' }} working-directory: src/generate run: ./syncMaintainers.ts diff --git a/.github/workflows/pull-requests.yml b/.github/workflows/pull-requests.yml index bf18429f..e8f13d2a 100644 --- a/.github/workflows/pull-requests.yml +++ b/.github/workflows/pull-requests.yml @@ -5,11 +5,11 @@ on: jobs: triage: - name: Add Labels + name: Add labels runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/labeler@v4.0.3 with: configuration-path: .github/pr-labeler.yml diff --git a/.github/workflows/typos.yml b/.github/workflows/typos.yml index eec53ac1..1a53c874 100644 --- a/.github/workflows/typos.yml +++ b/.github/workflows/typos.yml @@ -6,23 +6,23 @@ on: branches: [main] jobs: - run: - name: Spell Check + spellcheck: + name: Spellcheck runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: crate-ci/typos@master id: typos continue-on-error: true # 'continue-on-error' will always succeed, we should exit based on the outcome and not the conclusion # ref: https://docs.github.com/en/actions/learn-github-actions/contexts#steps-context - - name: Fail When Typos Are Found in Pull Request + - name: Fail when typos are found in pull request if: ${{ github.event_name == 'pull_request' && steps.typos.outcome != 'success' }} run: "exit 1" # We always want this check to pass on branch 'main' but continue to fail on PRs - - name: Pass When Branch 'main' + - name: Pass on 'main' branch if: ${{ github.repository == 'catppuccin/userstyles' && github.ref == 'refs/heads/main' }} run: "exit 0"