chore(deps): update dependencies (minor/patch) #291
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
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | |
name: Lint and build | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
check-kotlin: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Validate gradle-wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Lint | |
uses: musichin/ktlint-check@v2 | |
with: | |
patterns: | | |
./kotlin/**/**.kt | |
!./kotlin/**/generated/** | |
lint-and-build: | |
needs: check-kotlin | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 11 | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
with: | |
build-root-directory: kotlin | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- uses: pnpm/action-setup@v2 | |
name: Install pnpm | |
id: pnpm-install | |
with: | |
version: 7 | |
run_install: false | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
name: Setup next cache | |
with: | |
path: | | |
${{ github.workspace }}/.next/cache | |
${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
key: ${{ runner.os }}-next-store-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} | |
restore-keys: | | |
${{ runner.os }}-next-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
- name: Install dependencies | |
run: pnpm install | |
- name: Lint | |
run: pnpm run lint | |
- name: Download template contents | |
run: | | |
curl -L -o temp.zip https://github.com/turtton/volglass-docs/archive/refs/heads/main.zip | |
7z x temp.zip | |
cp -r volglass-docs-main/posts . | |
- name: Build | |
run: pnpm run build | |
build-docker: | |
needs: check-kotlin | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Download template contents | |
run: | | |
curl -L -o temp.zip https://github.com/turtton/volglass-docs/archive/refs/heads/main.zip | |
7z x temp.zip | |
cp -r volglass-docs-main/posts . | |
- name: Build | |
uses: docker/build-push-action@v4 | |
with: | |
file: ./Dockerfile | |
push: false | |
context: . |