From 6c6b27249142093882b7f045e3589ff5cf7e586d Mon Sep 17 00:00:00 2001 From: samatrhea Date: Sun, 12 May 2024 10:19:54 +0200 Subject: [PATCH] [Add] github nuget feed secret and update GH action versions --- .github/workflows/publish-docker-container.yml | 13 +++++++------ COMETwebapp/Dockerfile | 5 ++++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish-docker-container.yml b/.github/workflows/publish-docker-container.yml index 95f19ca65..454eb4a67 100644 --- a/.github/workflows/publish-docker-container.yml +++ b/.github/workflows/publish-docker-container.yml @@ -9,10 +9,10 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Docker meta id: meta @@ -22,13 +22,13 @@ jobs: - name: Login to Docker Hub if: github.ref_type == 'tag' - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_PASSWORD }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: ./COMETwebapp/Dockerfile @@ -36,7 +36,8 @@ jobs: tags: ${{ steps.meta.outputs.tags }} secrets: | "DEVEXPRESS_NUGET_KEY=${{ secrets.DEVEXPRESS_NUGET_KEY }}" - + "DEVEXPRESS_NUGET_KEY=${{ secrets.DEVEXPRESS_NUGET_KEY }}" + - name: Invoke deployment hook uses: distributhor/workflow-webhook@v3 env: diff --git a/COMETwebapp/Dockerfile b/COMETwebapp/Dockerfile index 477ca2ce1..2bdcaf5aa 100644 --- a/COMETwebapp/Dockerfile +++ b/COMETwebapp/Dockerfile @@ -5,8 +5,11 @@ FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build COPY COMET.Web.Common COMET.Web.Common COPY COMETwebapp COMETwebapp -RUN --mount=type=secret,id=DEVEXPRESS_NUGET_KEY export DEVEXPRESS_NUGET_KEY=$(cat /run/secrets/DEVEXPRESS_NUGET_KEY) \ +RUN --mount=type=secret,id=DEVEXPRESS_NUGET_KEY --mount=type=secret,id=GITHUB_TOKEN \ + && export DEVEXPRESS_NUGET_KEY=$(cat /run/secrets/DEVEXPRESS_NUGET_KEY) \ + && export GITHUB_TOKEN=$(cat /run/secrets/GITHUB_TOKEN) \ && dotnet nuget add source https://nuget.devexpress.com/api -n DXFeed -u DevExpress -p ${DEVEXPRESS_NUGET_KEY} --store-password-in-clear-text \ + && dotnet nuget add source https://nuget.pkg.github.com/STARIONGROUP/index.json -n StarionGroupNuget -u gh -p ${GITHUB_TOKEN} --store-password-in-clear-text \ && dotnet restore COMETwebapp RUN dotnet build COMETwebapp -c Release -o /app/build --no-restore