diff --git a/.github/workflows/container_apps_chat_cd.yml b/.github/workflows/container_apps_chat_cd.yml index b42662a7..3a2e8a8b 100644 --- a/.github/workflows/container_apps_chat_cd.yml +++ b/.github/workflows/container_apps_chat_cd.yml @@ -42,53 +42,11 @@ jobs: (needs.test.result == 'success' || needs.test.result == 'skipped') needs: [test] runs-on: ubuntu-latest - env: - DOCKER_IMAGE_NAME: chat steps: - name: Checkout code uses: actions/checkout@v4 - # Apply tags and labels based on GitHub Actions events and Git metadata - - name: Apply Docker Image tags & labels - id: meta - uses: docker/metadata-action@v5 - with: - # list of Docker images to use as base name for tags - images: | - ghcr.io/${{ github.repository_owner }}/${{ env.DOCKER_IMAGE_NAME }} - # generate Docker tags based on the following events/attributes - tags: | - type=ref,event=branch - type=ref,event=pr - type=match,pattern=v(.*),group=1 - type=match,pattern=v(\d.\d),group=1 - type=match,pattern=v(\d),group=1 - type=sha - type=raw,value=latest,enable={{is_default_branch}} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v5 - with: - push: true - context: . - file: ./src/container_apps/Jordnaer.Chat/Dockerfile - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - - name: Azure Login uses: azure/login@v1 with: @@ -99,8 +57,8 @@ jobs: with: appSourcePath: ${{ github.workspace }}src/container_apps/Jordnaer.Chat registryUrl: gcr.io - registryUsername: ${{ secrets.CHAT_REGISTRY_USERNAME }} - registryPassword: ${{ secrets.CHAT_REGISTRY_PASSWORD }} + registryUsername: ${{ github.repository_owner }} + registryPassword: ${{ secrets.GITHUB_TOKEN }} containerAppName: chat resourceGroup: Jordnaer imageToBuild: gcr.io/nielspilgaard/chat:${{ github.sha }}