Deploy Docker Image #8
This file contains hidden or 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 Docker Image | |
on: | |
workflow_run: | |
workflows: | |
- 'Bump version' | |
types: | |
- completed | |
jobs: | |
build_and_push: | |
runs-on: ubuntu-24.04-arm | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Docker Login | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GHCR_TOKEN }} | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'liberica' | |
java-version: '21' | |
- name: Get Maven version | |
run: | | |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) | |
echo "Project Maven Version: $VERSION" | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
- name: Build with Maven | |
run: mvn spring-boot:build-image -DskipTests | |
- name: Push Docker image | |
run: docker push ghcr.io/tutorialwork/kleinanzeigen-ads-renewer:${{ env.VERSION }} |