fix(deps): update all non-major dependencies (minor) #598
Workflow file for this run
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 | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- 'main' | |
tags: | |
- 'v*' | |
pull_request: | |
types: [opened, synchronize] | |
branches: | |
- 'main' | |
concurrency: ci-${{ github.ref_name }} | |
env: | |
TERM: xterm-256color | |
NODE_VERSION: 20 | |
PNPM_VERSION: 8 | |
IMAGE_PLATFORMS: 'linux/amd64,linux/arm64' | |
IMAGE_REGISTRY: 'ghcr.io' | |
IMAGE_NAME: ${{ github.repository }} | |
COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.sha }} | |
BRANCH_OR_TAG: ${{ github.event.pull_request.head.ref || github.ref_name }} | |
IS_MAIN: ${{ github.ref_name == 'main' }} | |
IS_PULL_REQUEST: ${{ github.event_name == 'pull_request' }} | |
jobs: | |
check: | |
name: Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
timeout-minutes: 2 | |
- name: Set up pnpm | |
uses: pnpm/action-setup@v2 | |
timeout-minutes: 2 | |
with: | |
version: ${{ env.PNPM_VERSION }} | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
timeout-minutes: 2 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: pnpm | |
cache-dependency-path: pnpm-lock.yaml | |
- name: Get pnpm store directory | |
id: pnpm-store | |
timeout-minutes: 2 | |
run: | | |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- name: Restore pnpm cache | |
uses: actions/cache@v4 | |
timeout-minutes: 2 | |
with: | |
path: ${{ steps.pnpm-store.outputs.STORE_PATH }} | |
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-pnpm-${{ env.PNPM_VERSION }}-store-${{ hashFiles('pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-node-${{ env.NODE_VERSION }}-pnpm-${{ env.PNPM_VERSION }}-store- | |
- name: Install npm dependencies | |
timeout-minutes: 2 | |
run: | | |
make install-ci | |
- name: Build TypeScript | |
timeout-minutes: 2 | |
run: | | |
make build-ci | |
- name: Run tests | |
timeout-minutes: 2 | |
run: | | |
make test-ci | |
- name: Check formatting | |
timeout-minutes: 2 | |
run: | | |
make format-ci | |
- name: Check lint errors | |
timeout-minutes: 2 | |
run: | | |
make lint-ci | |
docker: | |
needs: [check] | |
name: Docker | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
contents: read | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
timeout-minutes: 2 | |
- name: Set up QEMU | |
if: contains(env.IMAGE_PLATFORMS, ',') | |
uses: docker/setup-qemu-action@v3 | |
timeout-minutes: 2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
timeout-minutes: 2 | |
- name: Extract metadata for Docker | |
id: docker-meta | |
uses: docker/metadata-action@v5 | |
timeout-minutes: 2 | |
with: | |
images: | | |
${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }} | |
tags: | | |
type=ref,event=branch | |
type=ref,event=pr | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=semver,pattern={{major}} | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
timeout-minutes: 2 | |
with: | |
registry: ${{ env.IMAGE_REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Git metadata | |
id: git-meta | |
timeout-minutes: 2 | |
run: | | |
echo "BRANCH_OR_TAG_NORMALIZED_WITH_SHA=$(echo ${{ env.BRANCH_OR_TAG }} | tr '/' '-'),${{ env.COMMIT_SHA }}" >> $GITHUB_OUTPUT | |
- name: Build and push image to registry | |
uses: docker/build-push-action@v5 | |
timeout-minutes: 20 | |
with: | |
context: . | |
push: true | |
provenance: false | |
build-args: | | |
NODE_VERSION=${{ env.NODE_VERSION }} | |
PNPM_VERSION=${{ env.PNPM_VERSION }} | |
COMMIT_SHA=${{ steps.git-meta.outputs.BRANCH_OR_TAG_NORMALIZED_WITH_SHA }} | |
# https://github.com/docker/build-push-action/issues/545 | |
# cache-from: type=gha | |
# cache-to: type=gha,mode=max | |
platforms: ${{ env.IMAGE_PLATFORMS }} | |
tags: ${{ steps.docker-meta.outputs.tags }} | |
labels: ${{ steps.docker-meta.outputs.labels }} |