Skip to content

CHORE: [BOT] Auto resize image #144

CHORE: [BOT] Auto resize image

CHORE: [BOT] Auto resize image #144

Workflow file for this run

on:
pull_request:
types: [opened, synchronize]
name: PR Check
jobs:
install-deps:
if: github.repository == 'phpid-jakarta/phpid-learning'
name: Install dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- uses: pnpm/[email protected]
name: Install pnpm
id: pnpm-install
with:
version: 7.5.1
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- uses: actions/cache@v3
name: Cache project
with:
path: '.'
key: ${{ runner.os }}-${{ github.sha }}-cache-project
restore-keys: |
${{ runner.os }}-${{ github.sha }}-cache-project
lint:
if: github.repository == 'phpid-jakarta/phpid-learning'
name: ESLint
runs-on: ubuntu-latest
needs: install-deps
steps:
- name: Restore project
uses: actions/cache@v3
id: restore-project
with:
path: '.'
key: ${{ runner.os }}-${{ github.sha }}-cache-project
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- uses: pnpm/[email protected]
name: Install pnpm
id: pnpm-install
with:
version: 7.5.1
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Restore pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Lint files
run: pnpm run lint
env:
CI: true
build:
if: github.repository == 'phpid-jakarta/phpid-learning'
name: Check build
runs-on: ubuntu-latest
needs: install-deps
steps:
- name: Restore project
uses: actions/cache@v3
id: restore-project
with:
path: '.'
key: ${{ runner.os }}-${{ github.sha }}-cache-project
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- uses: pnpm/[email protected]
name: Install pnpm
id: pnpm-install
with:
version: 7.5.1
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Restore pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Perform build checking
run: pnpm run sync && pnpm run build
env:
CI: true
script:
if: github.repository == 'phpid-jakarta/phpid-learning'
name: Check scripts
runs-on: ubuntu-latest
needs: install-deps
steps:
- name: Restore project
uses: actions/cache@v3
id: restore-project
with:
path: '.'
key: ${{ runner.os }}-${{ github.sha }}-cache-project
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- uses: pnpm/[email protected]
name: Install pnpm
id: pnpm-install
with:
version: 7.5.1
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Restore pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Perform checking script:toJson
run: pnpm run script:toJson
env:
CI: true
- name: Perform checking script:qna
run: pnpm run script:qna
env:
CI: true