|
18 | 18 | with: |
19 | 19 | ref: ${{ github.event.pull_request.head.sha }} |
20 | 20 | token: ${{ secrets.GITHUB_TOKEN }} |
| 21 | + - name: Dump GitHub context |
| 22 | + env: |
| 23 | + GITHUB_CONTEXT: ${{ toJson(github) }} |
| 24 | + run: | |
| 25 | + echo "$GITHUB_CONTEXT" |
| 26 | + - name: Find submitting repository |
| 27 | + id: get-source-repo |
| 28 | + uses: actions/github-script@v8 |
| 29 | + env: |
| 30 | + OWNER: ${{ github.repository_owner }} |
| 31 | + REPO: ${{ github.repository }} |
| 32 | + PULL: ${{ github.event.number }} |
| 33 | + with: |
| 34 | + script: | |
| 35 | + const { data } = await github.rest.pulls.get({ |
| 36 | + owner: process.env.OWNER, |
| 37 | + repo: process.env.REPO.split('/')[1], |
| 38 | + pull_number: process.env.PULL, |
| 39 | + }); |
| 40 | + core.setOutput('remote', data.head.repo.html_url) |
| 41 | + core.setOutput('branch', data.head.ref) |
| 42 | + - name: Push plan |
| 43 | + run: | |
| 44 | + echo git push $REMOTE HEAD:$BRANCH |
| 45 | + env: |
| 46 | + REMOTE: ${{ steps.get-source-repo.outputs.remote }} |
| 47 | + BRANCH: ${{ steps.get-source-repo.outputs.branch }} |
21 | 48 | - name: Set git identity |
22 | 49 | run: | |
23 | 50 | git config --global user.name "nipreps[bot]" |
|
32 | 59 | run: | |
33 | 60 | uvx datalad run -i pixi.lock -i pyproject.toml -o pixi.lock -- pixi lock |
34 | 61 | - name: Push updated lockfile, if needed |
35 | | - run: git push |
| 62 | + run: | |
| 63 | + git push $REMOTE HEAD:$BRANCH |
| 64 | + env: |
| 65 | + REMOTE: ${{ steps.get-source-repo.outputs.remote }} |
| 66 | + BRANCH: ${{ steps.get-source-repo.outputs.branch }} |
0 commit comments