chore(deps): update yarn to v4 #366
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: PR | |
on: [pull_request] | |
jobs: | |
build: | |
name: Lint, format, test and build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout ποΈ | |
uses: actions/checkout@v4 | |
- name: Use Node LTS β¨ | |
uses: actions/setup-node@v3 | |
with: | |
node-version: lts/* | |
cache: yarn | |
- name: Installing dependencies π¦οΈ | |
run: yarn install --immutable | |
- name: Lint π | |
run: yarn lint | |
- name: Format π | |
run: yarn format:check | |
- name: Test π§ͺ | |
run: yarn test --passWithNoTests | |
- name: Build π¨ | |
run: yarn build | |
build-container: | |
name: Build container | |
runs-on: ubuntu-latest | |
env: | |
# Consider replacing Docker repository below, e.g. like this: | |
# IMAGE_NAME: ${{ secrets.CONTAINER_REPOSITORY }}/${{ inputs.name }} | |
IMAGE_NAME: bjerkio/${{ github.event.repository.name }} | |
steps: | |
- name: Checkout ποΈ | |
uses: actions/checkout@v4 | |
- name: Docker meta π· | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: ${{ env.IMAGE_NAME }} | |
tags: | | |
type=ref,event=pr | |
- name: Set up Docker Buildx π¨ | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build Docker π | |
uses: docker/build-push-action@v4 | |
with: | |
context: ./ | |
file: ./Dockerfile | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
# Uncomment to enable caching | |
# cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:latest | |
cache-to: type=inline |