Skip to content

Use Adoptium buildpack #198

Use Adoptium buildpack

Use Adoptium buildpack #198

name: Build and Push Docker Image
on:
push:
branches:
- staging
jobs:
build-and-push-rc:
name: Build and Push RC Docker Image
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Docker Buildx
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 21
uses: actions/setup-java@v3
with:
java-version: 21
distribution: temurin
- name: Build OCI Image
uses: gradle/gradle-build-action@v2
with:
arguments: clean bootBuildImage --imageName=${{ secrets.DOCKER_REGISTRY_URL }}/cmsch:rc
build-root-directory: backend
- name: Push OCI Image
run: docker push ${{ secrets.DOCKER_REGISTRY_URL }}/cmsch:rc
- name: Logout from Docker Registry
run: docker logout ${{ secrets.DOCKER_REGISTRY_URL }}