From 671c1c0281629d5871cf4ec72f70deee1d49fe74 Mon Sep 17 00:00:00 2001 From: adkumar1 Date: Thu, 17 Aug 2023 11:35:16 +0530 Subject: [PATCH] revert --- .github/workflows/build.yaml | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1814fc31..53ba8e86 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -18,6 +18,7 @@ #* SPDX-License-Identifier: Apache-2.0 #******************************************************************************** + name: build # Controls when the workflow will run @@ -37,8 +38,10 @@ on: # Allows you to run this workflow manually from the Actions tab workflow_dispatch: env: - IMAGE_NAMESPACE: "tractusx" - IMAGE_NAME: "sdfactory" + REGISTRY: ghcr.io + IMAGE_NAME: catenax-ng/tx-managed-service-orchestrator/autosetup + # Allows you to run this workflow manually from the Actions tab + # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: @@ -60,9 +63,7 @@ jobs: uses: docker/metadata-action@v4 with: images: | - ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }} - # Automatically prepare image tags; See action docs for more examples. - # semver patter will generate tags like these for example :1 :1.2 :1.2.3 + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | type=ref,event=branch type=ref,event=pr @@ -72,31 +73,18 @@ jobs: flavor: | latest=true - - name: DockerHub login + - name: Log into registry ${{ env.REGISTRY }} if: github.event_name != 'pull_request' uses: docker/login-action@v2 with: - # Use existing DockerHub credentials present as secrets - username: ${{ secrets.DOCKER_HUB_USER }} - password: ${{ secrets.DOCKER_HUB_TOKEN }} + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push uses: docker/build-push-action@v3 with: context: . - # Build image for verification purposes on every trigger event. Only push if event is not a PR push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - - # https://github.com/peter-evans/dockerhub-description - # Important step to push image description to DockerHub - - name: Update Docker Hub description - if: github.event_name != 'pull_request' - uses: peter-evans/dockerhub-description@v3 - with: - # readme-filepath defaults to toplevel README.md, Only necessary if you have a dedicated file with your 'Notice for docker images' - # readme-filepath: path/to/dedicated/notice-for-docker-image.md - username: ${{ secrets.DOCKER_HUB_USER }} - password: ${{ secrets.DOCKER_HUB_TOKEN }} - repository: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}