Skip to content

Tests triggered by PR: WIP: esp-qcom-image: convert to OE-core uki.bbclass #14

Tests triggered by PR: WIP: esp-qcom-image: convert to OE-core uki.bbclass

Tests triggered by PR: WIP: esp-qcom-image: convert to OE-core uki.bbclass #14

Workflow file for this run

name: Test PR build
run-name: "Tests triggered by PR: ${{ github.event.workflow_run.display_title }}"
on:
workflow_run:
workflows: ["Build on PR"]
types:
- completed
jobs:
retrieve-build-url:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
outputs:
url: ${{ steps.set-build-url.outputs.url }}
steps:
- name: 'Download build URL'
uses: actions/github-script@v6
with:
script: |
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.payload.workflow_run.id,
});
let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => {
return artifact.name == "build_url"
})[0];
let download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
const fs = require('fs');
const path = require('path');
const temp = '${{ runner.temp }}/artifacts';
if (!fs.existsSync(temp)){
fs.mkdirSync(temp);
}
fs.writeFileSync(path.join(temp, 'build_url.zip'), Buffer.from(download.data));
- name: 'Setup build URL'
id: set-build-url
run: |
unzip "${{ runner.temp }}/artifacts/build_url.zip"
BUILD_URL=$(cat build_url)
echo "Build URL: ${BUILD_URL}"
echo "url=${BUILD_URL}" >> $GITHUB_OUTPUT
test:
uses: ./.github/workflows/test.yml
secrets: inherit
needs: retrieve-build-url
with:
url: ${{ needs.retrieve-build-url.outputs.url }}