initial commit
This commit is contained in:
27
.github/workflows/build-and-publish.yaml
vendored
Normal file
27
.github/workflows/build-and-publish.yaml
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
name: Build & Push (Docker)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
name: Build JAR and push Docker image
|
||||
runs-on: ubuntu-18.04
|
||||
env:
|
||||
repo: lwluc/camunda-ddd-and-clean-architecture
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 17
|
||||
- name: Maven Package
|
||||
run: mvn clean package
|
||||
- name: Login to Docker Hub
|
||||
run: docker login -u ${{ secrets.DOCKER_USER }} -p '${{ secrets.DOCKER_TOKEN }}'
|
||||
- name: Build Docker image
|
||||
run: docker build -t ${{env.repo}} .
|
||||
- name: Publish Docker image
|
||||
run: docker push ${{env.repo}}
|
||||
Reference in New Issue
Block a user