Update scala-library to 2.13.15 #373
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: Test | |
on: | |
push: | |
branches: [master] | |
tags: [ v* ] | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- uses: coursier/cache-action@v6 | |
- uses: olafurpg/setup-scala@v12 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
# https://github.com/actions/cache/blob/master/examples.md#node---yarn | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- uses: actions/cache@v2 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- uses: actions/cache@v2 | |
name: Cache node_modules | |
with: | |
path: "node_modules" | |
key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }} | |
restore-keys: ${{ runner.os }}-node_modules | |
- uses: actions/cache@v2 | |
name: Cache scalajs-bundler node_modules | |
with: | |
path: "*/target/**/main/node_modules" | |
key: ${{ runner.os }}-scalajsbundler-node_modules-${{ hashFiles('*/yarn.lock') }} | |
restore-keys: ${{ runner.os }}-scalajsbundler-node_modules | |
- name: Cache Scalablytyped transpilations | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.ivy2/local/org.scalablytyped | |
~/.cache/scalablytyped | |
key: ${{ runner.os }}-scalablytyped-${{ hashfiles('build.sbt') }}-${{ hashFiles('*/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-scalablytyped- | |
# https://github.com/docker/setup-qemu-action | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
# https://github.com/docker/setup-buildx-action | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
- run: sbt test | |
- run: ./publish.sh | |
- if: github.event_name == 'pull_request' || !startsWith(github.ref, 'refs/tags/v') | |
name: Build Docker Images | |
run: | | |
docker buildx build \ | |
--platform linux/arm64,linux/amd64 \ | |
. | |
- if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/v') | |
name: Build and Publish Docker Images | |
run: | | |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u USERNAME --password-stdin | |
docker buildx build \ | |
--platform linux/arm64,linux/amd64 \ | |
--tag ghcr.io/fun-stack/local-env:$(cd npm && npm pkg get version | tr -d '"') \ | |
--label "org.opencontainers.image.source=https://github.com/fun-stack/local-env" \ | |
--label "org.opencontainers.image.licenses=MIT" \ | |
--push \ | |
. | |
- if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/v') | |
uses: JS-DevTools/npm-publish@v1 | |
with: | |
package: ./npm/package.json | |
token: ${{ secrets.NPM_TOKEN }} | |
# - name: Debug over SSH (tmate) | |
# # if: ${{ failure() }} | |
# uses: mxschmitt/action-tmate@v3 | |
# with: | |
# limit-access-to-actor: true |