Fix some settings (#913) #84
Workflow file for this run
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: Build and Push Release Docker Image | |
on: | |
workflow_dispatch: # allow manually running this workflow | |
push: | |
tags: | |
- v* | |
jobs: | |
build-and-push-release: | |
name: Build and Push Release Docker Image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
- name: Set up Docker Buildx | |
with: | |
cache-binary: false | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to Docker Registry | |
run: echo ${{ secrets.DOCKER_REGISTRY_PASSWORD }} | docker login -u ${{ secrets.DOCKER_REGISTRY_USERNAME }} --password-stdin ${{ secrets.DOCKER_REGISTRY_URL }} | |
- name: Set up JDK 23 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 23 | |
distribution: temurin | |
- name: Build OCI Image | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: clean bootBuildImage --imageName=${{ secrets.DOCKER_REGISTRY_URL }}/cmsch:release | |
build-root-directory: backend | |
- name: Tag image with version | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} # if this workflow was triggered by a new tag starting with "v" | |
run: docker image tag ${{ secrets.DOCKER_REGISTRY_URL }}/cmsch:release ${{ secrets.DOCKER_REGISTRY_URL }}/cmsch:"$GITHUB_REF_NAME" | |
env: | |
GITHUB_REF_NAME: ${{ github.ref_name }} | |
- name: Push OCI Image | |
run: docker image push --all-tags ${{ secrets.DOCKER_REGISTRY_URL }}/cmsch | |
- name: Logout from Docker Registry | |
run: docker logout ${{ secrets.DOCKER_REGISTRY_URL }} |