Skip to content

improve scala compare #39

improve scala compare

improve scala compare #39

Workflow file for this run

name: Docker build & publish
permissions:
contents: read
packages: write
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=ref,event=tag
type=sha
# build with scala-cli
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Lowercase the repo name and username
run: echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
- uses: coursier/cache-action@v6
- uses: VirtusLab/scala-cli-setup@main
# build with docker with scala-cli
- name: Build
run: |
scala-cli --power package --docker . --docker-image-repository ghcr.io/${{ github.repository }}
# login to GitHub Container Registry
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# publish to GitHub Container Registry
- name: Publish
run: |
docker push ghcr.io/${{ github.repository }}:latest