1 name: "Postback Pull Request"
5 workflows: ["Build Pull Request"]
14 - name: Download Artifacts from Build
15 uses: TizenAPI/tizenfx-build-actions/download-workflow-artifacts@master
17 token: ${{ secrets.TIZENAPI_GITHUB_TOKEN }}
18 run-id: ${{ github.event.workflow_run.id }}
22 - name: Find Pull Request
24 uses: actions/github-script@v6
26 WORKFLOW_HEAD_SHA: ${{ github.event.workflow_run.head_sha }}
29 const res = await github.rest.pulls.list({
30 owner: context.repo.owner,
31 repo: context.repo.repo,
34 if (res.status === 200) {
35 const pr = res.data.find(d => d.head.sha == process.env.WORKFLOW_HEAD_SHA);
37 core.setOutput('number', pr.number);
38 core.setOutput('base_ref', pr.base.ref);
42 - name: Report Error if Failure
43 if: ${{ github.event.workflow_run.conclusion == 'failure' }}
44 uses: actions/github-script@v6
46 PR_NUMBER: ${{ steps.pull_request.outputs.number }}
48 github-token: ${{ secrets.TIZENAPI_GITHUB_TOKEN }}
50 const fs = require('fs');
51 const json = fs.readFileSync('Artifacts/errors.json', 'utf8');
52 const errors = JSON.parse(json).join('\n');
53 github.rest.issues.createComment({
54 issue_number: process.env.PR_NUMBER,
55 owner: context.repo.owner,
56 repo: context.repo.repo,
57 body: '## Build Error:\n```\n' + errors + '\n```'
60 - name: Report API comparison result
61 if: ${{ github.event.workflow_run.conclusion == 'success' }}
62 uses: TizenAPI/tizenfx-build-actions/apidb-report@master
64 token: ${{ secrets.TIZENAPI_GITHUB_TOKEN }}
65 issue-number: ${{ steps.pull_request.outputs.number }}
66 path: Artifacts/api-comp.json