Update all non-major dependencies #1000
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci&cd | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- run: corepack enable | |
- name: find pnpm cache path | |
id: cache | |
run: echo "::set-output name=path::$(pnpm store path)" | |
- uses: actions/cache@v4 | |
with: | |
path: ${{ steps.cache.outputs.path }} | |
key: v1-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
v1-pnpm- | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- run: pnpm lint --format compact | |
typecheck: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- run: corepack enable | |
- name: find pnpm cache path | |
id: cache | |
run: echo "::set-output name=path::$(pnpm store path)" | |
- uses: actions/cache@v4 | |
with: | |
path: ${{ steps.cache.outputs.path }} | |
key: v1-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
v1-pnpm- | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- run: pnpm typecheck | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- run: corepack enable | |
- name: find pnpm cache path | |
id: cache | |
run: echo "::set-output name=path::$(pnpm store path)" | |
- uses: actions/cache@v4 | |
with: | |
path: ${{ steps.cache.outputs.path }} | |
key: v1-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
v1-pnpm- | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- run: pnpm test | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
ghcr.io/${{ github.repository }} | |
tags: | | |
type=raw,value={{sha}} | |
type=raw,value=latest | |
- name: Login to GitHub Container Registry | |
if: github.ref == 'refs/heads/master' | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and maybe Push Docker image | |
uses: docker/build-push-action@v6 | |
with: | |
push: ${{ github.ref == 'refs/heads/master' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |