Skip to content

Commit

Permalink
ci: avoid running the lint job twice
Browse files Browse the repository at this point in the history
  • Loading branch information
ngshiheng committed May 2, 2022
1 parent c1111ba commit 6b2501d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
24 changes: 10 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,28 @@
name: CI
on:
"on":
push:
branches:
- "main"
repository_dispatch:

- main
repository_dispatch: null
jobs:
lint:
uses: ./.github/workflows/lint.yml

build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "lts/*"
cache: "npm"
node-version: lts/*
cache: npm
- run: npm ci
- run: npm run build --if-present
env:
CI: true
- uses: cloudflare/[email protected]
name: Deploy to Cloudflare
with:
apiToken: ${{ secrets.CF_API_TOKEN }}

apiToken: "${{ secrets.CF_API_TOKEN }}"
semantic-release:
runs-on: ubuntu-latest
needs:
Expand All @@ -34,15 +31,14 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "lts/*"
cache: "npm"
node-version: lts/*
cache: npm
- run: npm ci
- run: npx semantic-release
name: Semantic Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
NPM_TOKEN: "${{ secrets.NPM_TOKEN }}"
load-test:
runs-on: ubuntu-latest
timeout-minutes: 30
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ on:
push:
branches:
- "**"
workflow_call:

- "!main"
workflow_call: null
jobs:
lint:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 6b2501d

Please sign in to comment.