2021-04-01 02:58:19 -04:00
|
|
|
name: Update docker image
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2021-04-01 03:00:28 -04:00
|
|
|
branches: [ master ]
|
2021-04-01 02:58:19 -04:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- name: Check Out Repo
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Set up JDK
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
2021-04-01 03:01:51 -04:00
|
|
|
java-version: 1.16
|
2021-04-01 02:58:19 -04:00
|
|
|
|
|
|
|
- name: Assemble Jar
|
|
|
|
run: sbt assembly
|
|
|
|
|
|
|
|
- name: Login to Docker Hub
|
2021-12-09 22:56:50 -05:00
|
|
|
if: github.event_name != 'pull_request'
|
2021-04-01 02:58:19 -04:00
|
|
|
uses: docker/login-action@v1
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
id: buildx
|
|
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
|
|
|
|
- name: Build and push
|
|
|
|
id: docker_build
|
|
|
|
uses: docker/build-push-action@v2
|
|
|
|
with:
|
|
|
|
context: ./
|
|
|
|
file: ./Runner.Dockerfile
|
|
|
|
tags: librecaptcha/lc-core:latest
|
2021-12-09 22:56:50 -05:00
|
|
|
push: ${{ github.event_name != 'pull_request' }}
|
2021-04-01 02:58:19 -04:00
|
|
|
|
|
|
|
- name: Image digest
|
|
|
|
run: echo ${{ steps.docker_build.outputs.digest }}
|