Skip to content

Update dependencies #171

Update dependencies

Update dependencies #171

Workflow file for this run

name: Docker
on:
push:
branches:
- main
tags:
- 'v*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-push-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Coursier cache
uses: coursier/cache-action@v6
- uses: coursier/setup-action@v1
with:
jvm: adopt:8
apps: sbt scala
- name: Compile and prepare Docker configuration
run: sbt Docker/stage
env:
DISABLE_ASSERTIONS: 1
GITHUB_TOKEN: ${{ secrets.GH_PERSONAL_TOKEN }}
- name: Log in to the GitHub Container registry
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/[email protected]
with:
images: michaelmior/jsonoid-discovery
tags: |
# semver tags
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
# set latest tag for default branch
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push image
uses: docker/build-push-action@v4
with:
context: ./target/docker/stage
load: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Test image
env:
DOCKER_TAG: ${{ steps.meta.outputs.tags }}
run: (echo '{}' | docker run --rm -i $(echo "$DOCKER_TAG" | head -1) > /dev/null) && echo "OK"
- name: Build and push image
uses: docker/build-push-action@v4
with:
context: ./target/docker/stage
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}