1
0
mirror of https://github.com/pcvolkmer/etl-processor.git synced 2025-04-19 17:26:51 +00:00

Add docker deploy workflow

This commit is contained in:
Paul-Christian Volkmer 2023-08-10 17:46:11 +02:00
parent 1e29ecc891
commit d24d9a7fd0
2 changed files with 33 additions and 2 deletions

30
.github/workflows/docker.yml vendored Normal file
View File

@ -0,0 +1,30 @@
name: "Run docker build and deploy"
on:
push:
tags:
- '*'
jobs:
call-test-workflow:
uses: ./.github/workflows/test.yml
docker:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Execute image build and push
run: |
./gradlew bootBuildImage
docker tag ghcr.io/ccc-mf/etl-processor ghcr.io/ccc-mf/etl-processor:${{ github.ref_name }}
docker push ghcr.io/ccc-mf/etl-processor
docker push ghcr.io/ccc-mf/etl-processor:${{ github.ref_name }}

View File

@ -1,13 +1,14 @@
name: "Run Tests"
on:
workflow_call:
push:
branches: [ 'master' ]
pull_request:
branches: [ '*' ]
jobs:
docker:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
@ -17,7 +18,7 @@ jobs:
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/gradle-build-action@v2.4.2
- name: Execute tests
run: ./gradlew test