restore Docker workflow

This commit is contained in:
Athou
2024-08-11 22:04:35 +02:00
parent cc32f8ad16
commit 09e0a51b46
7 changed files with 86 additions and 27 deletions

View File

@@ -1,4 +1,4 @@
name: Java CI
name: ci
on: [ push ]
@@ -43,3 +43,55 @@ jobs:
with:
name: commafeed-${{ matrix.database }}-${{ runner.os }}-${{ runner.arch }}
path: commafeed-server/target/commafeed-*-runner
# Docker
- name: Login to Container Registry
uses: docker/login-action@v3
if: ${{ github.ref_type == 'tag' || github.ref_name == 'master' }}
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker build and push tag - native
uses: docker/build-push-action@v6
if: ${{ github.ref_type == 'tag' }}
with:
context: commafeed-server
file: src/main/docker/Dockerfile.native
push: true
platforms: linux/amd64
tags: |
athou/commafeed:latest
athou/commafeed:${{ github.ref_name }}
- name: Docker build and push tag - jvm
uses: docker/build-push-action@v6
if: ${{ github.ref_type == 'tag' }}
with:
context: commafeed-server
file: src/main/docker/Dockerfile.jvm
push: true
platforms: linux/amd64,linux/arm64/v8
tags: |
athou/commafeed:latest-jvm
athou/commafeed:${{ github.ref_name }}-jvm
- name: Docker build and push master - native
uses: docker/build-push-action@v6
if: ${{ github.ref_name == 'master' }}
with:
context: commafeed-server
file: src/main/docker/Dockerfile.native
push: true
platforms: linux/amd64
tags: athou/commafeed:master
- name: Docker build and push master - jvm
uses: docker/build-push-action@v6
if: ${{ github.ref_name == 'master' }}
with:
context: commafeed-server
file: src/main/docker/Dockerfile.jvm
push: true
platforms: linux/amd64
tags: athou/commafeed:master-jvm