ci: Debug

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>
This commit is contained in:
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs 2021-07-24 16:20:50 +02:00
parent 5ea3df64a9
commit fe2b0a8eb1
No known key found for this signature in database
GPG Key ID: 228A77789D71A6E2

View File

@ -105,12 +105,6 @@ jobs:
console.log(result)
return result
- name: Get result
run: |
echo "${{steps.get-workflow-jobs.outputs.result}}"
echo ""
echo "${{steps.get-workflow-jobs.outputs.result.lint}}"
# # CI Passed
# - name: "add label: ok"
# uses: actions-ecosystem/action-add-labels@v1
@ -128,19 +122,25 @@ jobs:
# number: ${{ needs.get-info.outputs.pullRequestNumber }}
# labels: "lint:failed"
# # CI Failed
# - name: "add label: failed"
# uses: actions-ecosystem/action-add-labels@v1
# if: ${{ github.event.workflow_run.conclusion == 'failure' }}
# with:
# github_token: ${{ steps.get-app-token.outputs.token }}
# number: ${{ needs.get-info.outputs.pullRequestNumber }}
# labels: "lint:failed"
# - name: "remove label: ok"
# uses: actions-ecosystem/action-remove-labels@v1
# if: ${{ github.event.workflow_run.conclusion == 'failure' }}
# with:
# github_token: ${{ steps.get-app-token.outputs.token }}
# number: ${{ needs.get-info.outputs.pullRequestNumber }}
# labels: "lint:ok"
- name: "Lint failed"
uses: actions/github-script@v4
if: ${{ fromJSON(steps.get-workflow-jobs.outputs.result).lint == 'failure' }}
env:
LABEL_OK: "lint:ok"
LABEL_FAILED: "lint:failed"
with:
github-token: ${{ steps.get-app-token.outputs.token }}
script: |
const { LABEL_OK, LABEL_FAILED } = process.env
github.issues.addLabels({
issue_number: context.needs.get-info.outputs.pullRequestNumber,
owner: context.repo.owner,
repo: context.repo.repo,
labels: [LABEL_FAILED]
})
github.issues.removeLabel({
issue_number: context.needs.get-info.outputs.pullRequestNumber,
owner: context.repo.owner,
repo: context.repo.repo,
name: [LABEL_OK]
})