From 2e708bce1cd6f55050ec43c005e4113cbdbfeb5c Mon Sep 17 00:00:00 2001 From: ramueSVA <156297972+ramueSVA@users.noreply.github.com> Date: Mon, 15 Jul 2024 08:52:52 +0200 Subject: [PATCH] new registry job (#26) * new registry job --- .github/workflows/build-for-development.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-for-development.yml b/.github/workflows/build-for-development.yml index 7f67c23..3a779e5 100644 --- a/.github/workflows/build-for-development.yml +++ b/.github/workflows/build-for-development.yml @@ -64,7 +64,7 @@ jobs: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} continue-on-error: true - docker: + registry: needs: test_and_scan if: github.event.pull_request.merged == true @@ -78,12 +78,14 @@ jobs: java-version: '17' distribution: 'temurin' cache: 'maven' - - name: Login to docker hub + - name: Log in to GitHub Container Registry uses: docker/login-action@v3 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push docker image run: | - mvn spring-boot:build-image -Dspring-boot.build-image.imageName=numforschungsdatenplattform/num-aql-editor:develop -DskipTests - docker push numforschungsdatenplattform/num-aql-editor:develop + IMAGE_NAME=ghcr.io/num-forschungsdatenplattform/num-aql-editor:develop + mvn spring-boot:build-image -Dspring-boot.build-image.imageName=$IMAGE_NAME -DskipTests + docker push $IMAGE_NAME \ No newline at end of file