diff --git a/.github/workflows/ci-validate.yml b/.github/workflows/ci-validate.yml index 9801c6fe3..501dad29a 100644 --- a/.github/workflows/ci-validate.yml +++ b/.github/workflows/ci-validate.yml @@ -51,6 +51,8 @@ jobs: name: Flyway Migration Check if: ${{ github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip ci]') }} uses: ./.github/workflows/migrations-check.yml + permissions: + contents: read with: base_ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }} head_ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} diff --git a/.github/workflows/release-main.yml b/.github/workflows/release-main.yml index e691c2ac9..8a24416dd 100644 --- a/.github/workflows/release-main.yml +++ b/.github/workflows/release-main.yml @@ -13,6 +13,8 @@ jobs: migration-check: name: Flyway Migration Check uses: ./.github/workflows/migrations-check.yml + permissions: + contents: read with: base_ref: ${{ github.event.before }} head_ref: ${{ github.sha }}