diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 72165aa2..d6a13678 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -27,11 +27,22 @@ jobs: - name: dotnet test run: dotnet test --no-build --verbosity normal Tests/Tests.csproj + ConfigTest: + runs-on: ubuntu-latest + outputs: + docker-username: ${{ steps.docker-username.outputs.defined }} + steps: + - id: docker-username + env: + DOCKER_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + if: "${{ env.DOCKER_USERNAME }}" + run: echo "::set-output name=defined::true" + DockerImage: - needs: BuildAndTest + needs: [BuildAndTest, ConfigTest] runs-on: ubuntu-latest name: "Build Docker image" - if: github.ref == 'refs/heads/master' + if: (github.ref == 'refs/heads/master') && (needs.ConfigTest.outputs.docker-username == 'true') steps: - uses: actions/checkout@v3 with: diff --git a/discord-bot-net.sln b/discord-bot-net.sln index 5388d400..28e5d2f0 100644 --- a/discord-bot-net.sln +++ b/discord-bot-net.sln @@ -22,7 +22,6 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{AD87F38F-BFCE-4EA6-A430-20C497552FD7}" ProjectSection(SolutionItems) = preProject .cirrus.yml = .cirrus.yml - azure-pipelines.yml = azure-pipelines.yml .github\workflows\codeql-analysis.yml = .github\workflows\codeql-analysis.yml CONTRIBUTING.md = CONTRIBUTING.md docker-compose.example.yml = docker-compose.example.yml @@ -30,6 +29,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution nuget.config = nuget.config README.md = README.md SECURITY.md = SECURITY.md + .github\workflows\dotnet.yml = .github\workflows\dotnet.yml EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OneDriveClient", "Clients\OneDriveClient\OneDriveClient.csproj", "{5C4BCF33-2EC6-455F-B026-8A0001B7B7AD}"