livetest: fix cloning of repo
Previously it was checking out origin/master not the PR's branch.
This commit is contained in:
parent
350621b443
commit
66c6e96406
1 changed files with 20 additions and 3 deletions
23
.github/workflows/livetest.yml.disabled
vendored
23
.github/workflows/livetest.yml.disabled
vendored
|
|
@ -46,11 +46,28 @@ jobs:
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y cockpit-system cockpit-ws nodejs npm sassc make
|
sudo apt install -y cockpit-system cockpit-ws nodejs npm sassc make
|
||||||
|
|
||||||
- name: Clone repository
|
- uses: actions/github-script@v3
|
||||||
uses: actions/checkout@v2
|
id: get-pr
|
||||||
with:
|
with:
|
||||||
# need this to also fetch tags
|
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}`)
|
||||||
|
}
|
||||||
|
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
repository: ${{ fromJSON(steps.get-pr.outputs.result).head.repo.full_name }}
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
ref: ${{ fromJSON(steps.get-pr.outputs.result).head.ref }}
|
||||||
|
|
||||||
- name: Compile and install the project
|
- name: Compile and install the project
|
||||||
run: make && sudo make install
|
run: make && sudo make install
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue