diff --git a/.github/workflows/build_provider.yml b/.github/workflows/build_provider.yml index 4fecaf4..33b08d8 100644 --- a/.github/workflows/build_provider.yml +++ b/.github/workflows/build_provider.yml @@ -34,6 +34,9 @@ jobs: strategy: fail-fast: true matrix: ${{ fromJSON(inputs.matrix) }} + permissions: + contents: read + id-token: write # For ESC secrets. steps: - name: Checkout Repo uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 diff --git a/.github/workflows/build_sdk.yml b/.github/workflows/build_sdk.yml index 5e8ab46..bf4913d 100644 --- a/.github/workflows/build_sdk.yml +++ b/.github/workflows/build_sdk.yml @@ -39,6 +39,9 @@ jobs: - dotnet - go - java + permissions: + contents: write # For Renovate SDKs. + id-token: write # For ESC secrets. steps: - name: Checkout Repo uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 diff --git a/.github/workflows/command-dispatch.yml b/.github/workflows/command-dispatch.yml index b464c1d..3c6cb02 100644 --- a/.github/workflows/command-dispatch.yml +++ b/.github/workflows/command-dispatch.yml @@ -18,6 +18,9 @@ jobs: command-dispatch-for-testing: name: command-dispatch-for-testing runs-on: ubuntu-latest + permissions: + contents: read + id-token: write # For ESC secrets. steps: - name: Checkout Repo uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 diff --git a/.github/workflows/community-moderation.yml b/.github/workflows/community-moderation.yml index d720be2..1989abf 100644 --- a/.github/workflows/community-moderation.yml +++ b/.github/workflows/community-moderation.yml @@ -8,10 +8,7 @@ jobs: - name: Checkout Repo uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: - persist-credentials: false - - id: esc-secrets - name: Map environment to ESC outputs - uses: ./.github/actions/esc-action + persist-credentials: false - id: schema_changed name: Check for diff in schema uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 diff --git a/.github/workflows/main-post-build.yml b/.github/workflows/main-post-build.yml index b2f1deb..fbbc586 100644 --- a/.github/workflows/main-post-build.yml +++ b/.github/workflows/main-post-build.yml @@ -28,6 +28,9 @@ jobs: continue-on-error: true name: generate_coverage_data runs-on: ubuntu-latest + permissions: + contents: read + id-token: write # For ESC secrets. steps: - name: Free Disk Space (Ubuntu) uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index beb66b7..09820f0 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -19,6 +19,7 @@ jobs: permissions: contents: read pull-requests: write + id-token: write # For ESC secrets. uses: ./.github/workflows/prerequisites.yml secrets: inherit with: @@ -30,6 +31,9 @@ jobs: uses: ./.github/workflows/build_provider.yml needs: prerequisites secrets: inherit + permissions: + contents: read + id-token: write # For ESC secrets. with: version: ${{ needs.prerequisites.outputs.version }} @@ -38,6 +42,9 @@ jobs: needs: prerequisites uses: ./.github/workflows/build_sdk.yml secrets: inherit + permissions: + contents: write # For Renovate SDKs. + id-token: write # For ESC secrets. with: version: ${{ needs.prerequisites.outputs.version }} @@ -46,6 +53,9 @@ jobs: needs: prerequisites uses: ./.github/workflows/main-post-build.yml secrets: inherit + permissions: + contents: write # For Renovate SDKs. + id-token: write # For ESC secrets. with: version: ${{ needs.prerequisites.outputs.version }} @@ -80,6 +90,9 @@ jobs: name: Tag release if labeled as needs-release needs: publish runs-on: ubuntu-latest + permissions: + contents: read + id-token: write # For ESC secrets. steps: - name: Checkout Repo uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 diff --git a/.github/workflows/prerequisites.yml b/.github/workflows/prerequisites.yml index 5eb9ac2..e427a19 100644 --- a/.github/workflows/prerequisites.yml +++ b/.github/workflows/prerequisites.yml @@ -40,6 +40,7 @@ jobs: permissions: contents: read pull-requests: write + id-token: write # For ESC secrets. outputs: version: ${{ steps.provider-version.outputs.version }} steps: @@ -78,7 +79,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00 # v5.5.0 + uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1 env: CODECOV_TOKEN: ${{ steps.esc-secrets.outputs.CODECOV_TOKEN }} - if: inputs.is_pr diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a800dc9..3e109a5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,6 +25,7 @@ jobs: permissions: contents: read pull-requests: write + id-token: write # For ESC secrets. uses: ./.github/workflows/prerequisites.yml secrets: inherit with: @@ -36,6 +37,9 @@ jobs: uses: ./.github/workflows/build_provider.yml needs: prerequisites secrets: inherit + permissions: + contents: read + id-token: write # For ESC secrets. with: version: ${{ needs.prerequisites.outputs.version }} @@ -44,6 +48,9 @@ jobs: needs: prerequisites uses: ./.github/workflows/build_sdk.yml secrets: inherit + permissions: + contents: write # For Renovate SDKs. + id-token: write # For ESC secrets. with: version: ${{ needs.prerequisites.outputs.version }} diff --git a/.github/workflows/run-acceptance-tests.yml b/.github/workflows/run-acceptance-tests.yml index e909a94..0868fe9 100644 --- a/.github/workflows/run-acceptance-tests.yml +++ b/.github/workflows/run-acceptance-tests.yml @@ -37,6 +37,7 @@ jobs: permissions: contents: read pull-requests: write + id-token: write # For ESC secrets. uses: ./.github/workflows/prerequisites.yml secrets: inherit with: @@ -48,6 +49,9 @@ jobs: uses: ./.github/workflows/build_provider.yml needs: prerequisites secrets: inherit + permissions: + contents: read + id-token: write # For ESC secrets. with: version: ${{ needs.prerequisites.outputs.version }} matrix: | @@ -65,6 +69,9 @@ jobs: needs: prerequisites uses: ./.github/workflows/build_sdk.yml secrets: inherit + permissions: + contents: write # For Renovate SDKs. + id-token: write # For ESC secrets. with: version: ${{ needs.prerequisites.outputs.version }} @@ -78,10 +85,7 @@ jobs: - name: Checkout Repo uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: - persist-credentials: false - - id: esc-secrets - name: Map environment to ESC outputs - uses: ./.github/actions/esc-action + persist-credentials: false - id: run-url name: Create URL to the run output run: echo "run-url=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> "$GITHUB_OUTPUT"