ci: simplify (#883)

This commit is contained in:
Michael Kriese 2024-11-08 14:06:34 +01:00 committed by GitHub
parent 4c22a107ea
commit a0608873fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 90 additions and 44 deletions

View file

@ -10,10 +10,23 @@ concurrency:
cancel-in-progress: true
env:
NODE_VERSION: 20
RENOVATE_VERSION: 38.142.7 # renovate: datasource=docker depName=renovate packageName=ghcr.io/renovatebot/renovate
jobs:
prepare:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
show-progress: false
- name: 📥 Setup Node.js
uses: ./.github/actions/setup-node
with:
save-cache: true
commitlint:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' || github.repository_owner != github.event.pull_request.head.repo.owner.login }}
@ -31,6 +44,8 @@ jobs:
continue-on-error: true
lint:
needs:
- prepare
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' || github.repository_owner != github.event.pull_request.head.repo.owner.login }}
@ -40,24 +55,15 @@ jobs:
with:
show-progress: false
- name: enable corepack
run: corepack enable
- name: 📥 Setup Node.js
uses: ./.github/actions/setup-node
- name: Setup node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
- name: enable corepack
run: corepack enable
- name: Install project
run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm lint
e2e:
needs:
- prepare
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' || github.repository_owner != github.event.pull_request.head.repo.owner.login }}
@ -73,20 +79,8 @@ jobs:
with:
show-progress: false
- name: enable corepack
run: corepack enable
- name: Setup node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
- name: enable corepack
run: corepack enable
- name: Install project
run: pnpm install --frozen-lockfile
- name: 📥 Setup Node.js
uses: ./.github/actions/setup-node
- name: Build
run: pnpm build
@ -121,7 +115,10 @@ jobs:
docker-user: root
release:
needs: [lint, commitlint, e2e]
needs:
- lint
- commitlint
- e2e
runs-on: ubuntu-latest
steps:
- name: Setup Git user
@ -150,20 +147,8 @@ jobs:
git merge --no-ff -Xtheirs -m 'skip: merge (${{ github.sha }}) [skip release]' ${{ github.sha }}
commit=$(git rev-parse HEAD)
- name: enable corepack
run: corepack enable
- name: Setup node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
- name: enable corepack
run: corepack enable
- name: Install project
run: pnpm install --frozen-lockfile
- name: 📥 Setup Node.js
uses: ./.github/actions/setup-node
- name: Push release branch
run: git push origin release:release