ci: bump actions and ensure consistent naming (#263)
This commit is contained in:
1 parent
73757fa1d3
commit
f36102df9e
7 files changed
+27
-30
No files matched your search
@@ -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
|
||||
|
||||
@@ -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>"
|
||||
@@ -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"
|
||||
|
||||
@@ -7,7 +7,7 @@ on:
|
||||
|
||||
jobs:
|
||||
triage:
|
||||
name: Add Labels
|
||||
name: Add labels
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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/[email protected]
|
||||
with:
|
||||
configuration-path: .github/pr-labeler.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"
|
||||
Reference in new issue
Block a user