Merge pull request #57 from dancier/upgrade-boot #507
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: deploy dancer to docker hub | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v4 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 21 | |
distribution: zulu | |
- name: Build the project with Maven | |
run: ./mvnw --batch-mode -update-snapshots package | |
- name: Login to the Docker registry | |
run: docker login --username ${{ secrets.DOCKER_HUB_USER }} --password ${{ secrets.DOCKER_HUB_PASS }} | |
- name: Build the Docker image | |
run: docker build -t dancier/dancer:$(git rev-parse --short "$GITHUB_SHA") -t dancier/dancer:latest . | |
- name: Publish the Docker image on hub.docker.com | |
run: docker push -a dancier/dancer |