diff --git a/.github/workflows/update-snapshots.yml b/.github/workflows/update-snapshots.yml index 15b14117..432fa2e0 100644 --- a/.github/workflows/update-snapshots.yml +++ b/.github/workflows/update-snapshots.yml @@ -12,6 +12,22 @@ jobs: ports: - 5000:5000 steps: + - uses: actions/github-script@v3 + id: get-pr + with: + script: | + const request = { + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.issue.number + } + core.info(`Getting PR #${request.pull_number} from ${request.owner}/${request.repo}`) + try { + const result = await github.pulls.get(request) + return result.data + } catch (err) { + core.setFailed(`Request failed with error ${err}`) + } - name: Generate token uses: tibdex/github-app-token@v1 id: generate-token @@ -27,6 +43,8 @@ jobs: uses: actions/checkout@v3 with: token: ${{ steps.generate-token.outputs.token }} + repository: ${{ fromJSON(steps.get-pr.outputs.result).head.repo.full_name }} + ref: ${{ fromJSON(steps.get-pr.outputs.result).head.ref }} - name: Build images run: | for distro in alpine centos debian; do