diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 78efe7e..568c7b9 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -11,8 +11,9 @@ on: jobs: build: - runs-on: ubuntu-latest + permissions: + contents: read steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/main_clonedevopstemplate.yml b/.github/workflows/main_clonedevopstemplate.yml index 96b448d..1714ba6 100644 --- a/.github/workflows/main_clonedevopstemplate.yml +++ b/.github/workflows/main_clonedevopstemplate.yml @@ -11,7 +11,7 @@ on: jobs: build: - runs-on: windows-latest + runs-on: ubuntu-latest permissions: contents: read #This is required for actions/checkout @@ -36,27 +36,27 @@ jobs: path: ${{env.DOTNET_ROOT}}/myapp deploy: - runs-on: windows-latest + runs-on: ubuntu-latest needs: build - environment: - name: 'Production' + environment: + name: 'Production' url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} - permissions: - id-token: write #This is required for requesting the JWT - contents: read #This is required for actions/checkout + permissions: + id-token: write #This is required for requesting the JWT + contents: read #This is required for actions/checkout steps: - name: Download artifact from build job uses: actions/download-artifact@v4 with: name: .net-app - - - name: Login to Azure - uses: azure/login@v2 - with: - client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_115A4872F8584980B401EF4FEA955410 }} - tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_2018B1D528CC44D2A72008BF3E5046DC }} - subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_9F7CD9C72BE445C0821771E18D062A0C }} + + - name: Login to Azure + uses: azure/login@v2 + with: + client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_115A4872F8584980B401EF4FEA955410 }} + tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_2018B1D528CC44D2A72008BF3E5046DC }} + subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_9F7CD9C72BE445C0821771E18D062A0C }} - name: Deploy to Azure Web App id: deploy-to-webapp diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml index 6d21261..7f89313 100644 --- a/.github/workflows/sonarqube.yml +++ b/.github/workflows/sonarqube.yml @@ -9,6 +9,8 @@ jobs: build: name: Build and analyze runs-on: windows-latest + permissions: + contents: read steps: - name: Set up JDK 17 uses: actions/setup-java@v4