fix: default to empty string if can't find the necessary relation letter #436
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: Test and build | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: Build and lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Node 16 | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16.x | |
- name: Install yarn | |
run: npm install -g yarn | |
- name: Get yarn cache directory path | |
id: yarn-cache-path | |
run: echo "::set-output name=dir::$(yarn config get cacheFolder)" | |
- name: Get yarn cache | |
uses: actions/cache@v2 | |
id: yarn-cache | |
with: | |
path: ${{ steps.yarn-cache-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Lint | |
run: yarn lint | |
- name: Build | |
run: yarn build | |
docker: | |
name: Build Docker container and push to registry | |
# Only run on pushes to dev & master | |
if: | |
${{ contains(fromJson('["master", "dev"]'), github.ref_name) && | |
github.event_name == 'push' }} | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Login to ghcr.io registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set tag name | |
id: tag | |
run: | |
'echo "::set-output name=tag::${{ github.ref_name == ''master'' && | |
''latest'' || github.ref_name }}"' | |
- name: Build & push container | |
uses: docker/build-push-action@v2 | |
with: | |
push: true | |
tags: | | |
ghcr.io/ovyerus/prismaliser:${{ steps.tag.outputs.tag }} | |
ovyerus/prismaliser:${{ steps.tag.outputs.tag }} |