Publish Docker images #2
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: Publish Docker images | |
on: workflow_dispatch | |
permissions: | |
contents: read | |
concurrency: publish | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
environment: publish | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
- name: Validate Gradle wrapper | |
uses: gradle/[email protected] | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Execute Gradle build with tests | |
run: ./gradlew build | |
- name: Build Docker images with gradle | |
run: ./gradlew imageBuild | |
- name: Login to Docker Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: 'docker.io' | |
username: ${{ secrets.DOCKERREGISTRY_USERNAME }} | |
password: ${{ secrets.DOCKERREGISTRY_TOKEN }} | |
- name: Tag And Push Docker Images | |
run: ./publish_images.sh |