1
0
mirror of https://github.com/pcvolkmer/etl-processor.git synced 2025-07-02 06:22:55 +00:00

Build and deploy docker image on new release

This commit is contained in:
2023-08-10 20:17:10 +02:00
parent 4dde13e79a
commit 044d01534b
2 changed files with 4 additions and 6 deletions

35
.github/workflows/deploy.yml vendored Normal file
View File

@ -0,0 +1,35 @@
name: "Run build and deploy"
on:
release:
types: [ 'published' ]
jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2.4.2
- 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 }}