From 4508c7004c0f8075e556b6c6678c60b0e958719e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mochol=C3=AD?= Date: Thu, 3 Nov 2022 18:25:41 +0100 Subject: [PATCH] Checkout the HEAD SHA for docs builds (#15510) --- .github/workflows/docs-checks.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/docs-checks.yml b/.github/workflows/docs-checks.yml index 89ac207ab8..e9f809c206 100644 --- a/.github/workflows/docs-checks.yml +++ b/.github/workflows/docs-checks.yml @@ -4,6 +4,8 @@ name: Check Docs on: push: branches: ["master", "release/*"] + # use this event type to share secrets with forks. + # it's important that the PR head SHA is checked out to run the changes pull_request_target: branches: ["master", "release/*"] paths: @@ -30,6 +32,8 @@ jobs: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} - uses: actions/setup-python@v4 with: python-version: "3.8" @@ -56,6 +60,7 @@ jobs: - uses: actions/checkout@v3 with: submodules: true + ref: ${{ github.event.pull_request.head.sha }} - uses: actions/download-artifact@v3 with: name: ci-packages-${{ github.sha }} @@ -130,6 +135,7 @@ jobs: - uses: actions/checkout@v3 with: submodules: true + ref: ${{ github.event.pull_request.head.sha }} - uses: actions/download-artifact@v3 with: name: ci-packages-${{ github.sha }}