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:
|
jobs:
|
||||||
file-checker:
|
file-checker:
|
||||||
name: Required Files Included
|
name: Required files included
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Check Files
|
- name: Check files
|
||||||
run: |
|
run: |
|
||||||
MISSING_FILES=0
|
MISSING_FILES=0
|
||||||
echo "# Missing Files Found 😢" >> $GITHUB_STEP_SUMMARY
|
echo "# Missing Files Found 😢" >> $GITHUB_STEP_SUMMARY
|
||||||
|
|||||||
@@ -1,25 +1,25 @@
|
|||||||
name: Prettier
|
name: Format
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
prettier:
|
format:
|
||||||
name: Format Code
|
name: Format Code
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.USERSTYLES_TOKEN }}
|
token: ${{ secrets.USERSTYLES_TOKEN }}
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
|
|
||||||
- name: Run Prettier
|
- name: Format files
|
||||||
run: npx prettier --write styles/**/*.css
|
run: npx prettier --write styles/**/*.css
|
||||||
|
|
||||||
- name: Push Changes
|
- name: Push changes
|
||||||
uses: stefanzweifel/git-auto-commit-action@v4
|
uses: stefanzweifel/git-auto-commit-action@v5
|
||||||
with:
|
with:
|
||||||
commit_message: "style: format code with prettier"
|
commit_message: "style: format code with prettier"
|
||||||
commit_author: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>"
|
commit_author: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>"
|
||||||
@@ -13,27 +13,24 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
generate-health-files:
|
generate-health-files:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Generate Health Files
|
name: Generate health files
|
||||||
permissions:
|
permissions:
|
||||||
# Give the default GITHUB_TOKEN write permission to commit and push the
|
# Give the default GITHUB_TOKEN write permission to commit and push the
|
||||||
# added or changed files to the repository.
|
# added or changed files to the repository.
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check Out Repository
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v3
|
|
||||||
if: env.HAS_USERSTYLES_TOKEN
|
if: env.HAS_USERSTYLES_TOKEN
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.USERSTYLES_TOKEN }}
|
token: ${{ secrets.USERSTYLES_TOKEN }}
|
||||||
ref: ${{ github.ref }}
|
ref: ${{ github.ref }}
|
||||||
|
- uses: actions/checkout@v4
|
||||||
- name: Check Out Repository (Fork)
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
if: env.HAS_USERSTYLES_TOKEN == 'false'
|
if: env.HAS_USERSTYLES_TOKEN == 'false'
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.ref }}
|
ref: ${{ github.ref }}
|
||||||
|
|
||||||
- name: Set up Deno
|
- name: Setup Deno
|
||||||
uses: denoland/setup-deno@v1
|
uses: denoland/setup-deno@v1
|
||||||
with:
|
with:
|
||||||
deno-version: v1.x
|
deno-version: v1.x
|
||||||
@@ -44,12 +41,12 @@ jobs:
|
|||||||
key: ${{ hashFiles('src/generate/deno.lock') }}
|
key: ${{ hashFiles('src/generate/deno.lock') }}
|
||||||
path: ${{ env.DENO_DIR }}
|
path: ${{ env.DENO_DIR }}
|
||||||
|
|
||||||
- name: Update Health Files
|
- name: Generate health files
|
||||||
working-directory: src/generate
|
working-directory: src/generate
|
||||||
run: ./generate.ts
|
run: ./generate.ts
|
||||||
|
|
||||||
- name: Push Changes
|
- name: Push changes
|
||||||
uses: stefanzweifel/git-auto-commit-action@v4
|
uses: stefanzweifel/git-auto-commit-action@v5
|
||||||
if: ${{ github.repository == 'catppuccin/userstyles' && github.ref == 'refs/heads/main' && env.HAS_USERSTYLES_TOKEN }}
|
if: ${{ github.repository == 'catppuccin/userstyles' && github.ref == 'refs/heads/main' && env.HAS_USERSTYLES_TOKEN }}
|
||||||
with:
|
with:
|
||||||
commit_message: "chore: generate health files"
|
commit_message: "chore: generate health files"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
triage:
|
triage:
|
||||||
name: Add Labels
|
name: Add labels
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -12,10 +12,10 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
sync-maintainers:
|
sync-maintainers:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Sync Maintainers
|
name: Sync maintainers
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.ref }}
|
ref: ${{ github.ref }}
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@ jobs:
|
|||||||
key: ${{ hashFiles('src/generate/deno.lock') }}
|
key: ${{ hashFiles('src/generate/deno.lock') }}
|
||||||
path: ${{ env.DENO_DIR }}
|
path: ${{ env.DENO_DIR }}
|
||||||
|
|
||||||
- name: Sync Maintainers
|
- name: Sync maintainers
|
||||||
if: ${{ github.repository == 'catppuccin/userstyles' && github.ref == 'refs/heads/main' }}
|
if: ${{ github.repository == 'catppuccin/userstyles' && github.ref == 'refs/heads/main' }}
|
||||||
working-directory: src/generate
|
working-directory: src/generate
|
||||||
run: ./syncMaintainers.ts
|
run: ./syncMaintainers.ts
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
triage:
|
triage:
|
||||||
name: Add Labels
|
name: Add labels
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/[email protected]
|
- uses: actions/[email protected]
|
||||||
with:
|
with:
|
||||||
configuration-path: .github/pr-labeler.yml
|
configuration-path: .github/pr-labeler.yml
|
||||||
|
|||||||
@@ -6,23 +6,23 @@ on:
|
|||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
spellcheck:
|
||||||
name: Spell Check
|
name: Spellcheck
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: crate-ci/typos@master
|
- uses: crate-ci/typos@master
|
||||||
id: typos
|
id: typos
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
# 'continue-on-error' will always succeed, we should exit based on the outcome and not the conclusion
|
# '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
|
# 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' }}
|
if: ${{ github.event_name == 'pull_request' && steps.typos.outcome != 'success' }}
|
||||||
run: "exit 1"
|
run: "exit 1"
|
||||||
|
|
||||||
# We always want this check to pass on branch 'main' but continue to fail on PRs
|
# 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' }}
|
if: ${{ github.repository == 'catppuccin/userstyles' && github.ref == 'refs/heads/main' }}
|
||||||
run: "exit 0"
|
run: "exit 0"
|
||||||
Reference in new issue
Block a user