diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4068960..a2d1646 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,6 +3,10 @@ name: Build on: pull_request: +permissions: + contents: read + pull-requests: write + env: # Set the DOTNET_SKIP_FIRST_TIME_EXPERIENCE environment variable to stop wasting time caching packages DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true @@ -17,7 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 with: lfs: true fetch-depth: 0 @@ -25,7 +29,7 @@ jobs: run: git fetch --tags shell: bash - name: 'Install .NET Core SDK' - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v6 with: dotnet-version: | 6.0.x @@ -45,12 +49,12 @@ jobs: if: github.event_name == 'pull_request' run: cp coverage/*/coverage.cobertura.xml coverage/coverage.cobertura.xml - name: 'Publish Code Coverage' - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: Coverage Cobertura Report path: './coverage/coverage.cobertura.xml' - name: 'Publish Test Results' - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: Tests HTML Report path: './coverage/VaultSharp.Extensions.Configuration.Test.html' @@ -67,7 +71,7 @@ jobs: indicators: true output: both - name: Add Coverage PR Comment - uses: marocchino/sticky-pull-request-comment@v2 + uses: marocchino/sticky-pull-request-comment@v3 if: github.event_name == 'pull_request' with: recreate: true diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 3dfeb41..6eab856 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -5,6 +5,9 @@ on: branches: - master +permissions: + contents: read + env: # Set the DOTNET_SKIP_FIRST_TIME_EXPERIENCE environment variable to stop wasting time caching packages DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true @@ -19,12 +22,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 with: lfs: true fetch-depth: 0 - name: 'Install .NET Core SDK' - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v6 with: dotnet-version: | 6.0.x @@ -50,7 +53,7 @@ jobs: echo "COVERAGE=$COVERAGE%" >> $GITHUB_ENV echo "BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_ENV - name: Create the Badgegg - uses: schneegans/dynamic-badges-action@v1.7.0 + uses: schneegans/dynamic-badges-action@v1.9.0 with: auth: ${{ secrets.GIST_SECRET }} gistID: 5242a4e2d58a428062b3a59824d5864e diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 99fe14d..31f6383 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -5,10 +5,14 @@ on: branches: - master +permissions: + contents: write + pull-requests: read + jobs: update_release_draft: runs-on: ubuntu-latest steps: - - uses: release-drafter/release-drafter@v6 + - uses: release-drafter/release-drafter@v7 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4d459b1..e969b4c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,13 +5,16 @@ on: tags: - '*' +permissions: + contents: read + jobs: build: name: Release runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 with: lfs: true fetch-depth: 0 @@ -19,7 +22,7 @@ jobs: run: git fetch --tags shell: pwsh - name: 'Install .NET Core SDK' - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v6 with: dotnet-version: | 6.0.x @@ -35,12 +38,12 @@ jobs: NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} shell: pwsh - name: 'Publish Code Coverage' - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: tests path: './Artefacts/**/coverage.opencover.xml' - name: 'Publish Test Results' - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: tests path: './Artefacts/VaultSharp.Extensions.Configuration.Test.html' diff --git a/Tests/VaultSharp.Extensions.Configuration.Test/IntegrationTests.cs b/Tests/VaultSharp.Extensions.Configuration.Test/IntegrationTests.cs index ba70ba2..1bf3a79 100644 --- a/Tests/VaultSharp.Extensions.Configuration.Test/IntegrationTests.cs +++ b/Tests/VaultSharp.Extensions.Configuration.Test/IntegrationTests.cs @@ -971,8 +971,8 @@ public async Task Success_TokenNoAuthMethod() var container = this.PrepareVaultContainer(tokenId: ""); try { - await container.StartAsync(cts.Token).ConfigureAwait(false); - await this.LoadDataAsync("http://localhost:8200", values).ConfigureAwait(false); + await container.StartAsync(cts.Token); + await this.LoadDataAsync("http://localhost:8200", values); // Moq mock of PostProcessHttpClientHandlerAction implementation: var mockConfigureProxyAction = new Mock>(); @@ -998,7 +998,7 @@ public async Task Success_TokenNoAuthMethod() finally { cts.Cancel(); - await container.DisposeAsync().ConfigureAwait(false); + await container.DisposeAsync(); } }