ci: More testing

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>
This commit is contained in:
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs 2021-07-24 13:37:05 +02:00
parent 454d818866
commit 8de01b8ffc
No known key found for this signature in database
GPG Key ID: 228A77789D71A6E2

View File

@ -2,29 +2,26 @@
name: "Metadata: Label pull requests CI status" name: "Metadata: Label pull requests CI status"
on: on:
check_run: workflow_run:
workflows:
- "Pre-commit consistency check"
- "Charts: Lint and test"
types: types:
- completed - completed
# workflow_run:
# workflows:
# - "Pre-commit consistency check"
# types:
# - completed
jobs: jobs:
get-info: get-info:
name: "Get information about the source run" name: "Get information about the source run"
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
# outputs: outputs:
# pullRequestNumber: ${{ steps.source-run-info.outputs.pullRequestNumber }} pullRequestNumber: ${{ steps.source-run-info.outputs.pullRequestNumber }}
steps: steps:
- uses: hmarr/debug-action@v2 - name: "Get information about the origin 'CI' run"
# - name: "Get information about the origin 'CI' run" uses: potiuk/get-workflow-origin@v1_3
# uses: potiuk/get-workflow-origin@v1_3 id: source-run-info
# id: source-run-info with:
# with: token: ${{ secrets.GITHUB_TOKEN }}
# token: ${{ secrets.GITHUB_TOKEN }} sourceRunId: ${{ github.event.workflow_run.id }}
# sourceRunId: ${{ github.event.workflow_run.id }}
# label-precommit: # label-precommit:
# name: Label pre-commit status # name: Label pre-commit status
@ -73,96 +70,49 @@ jobs:
# number: ${{ needs.get-info.outputs.pullRequestNumber }} # number: ${{ needs.get-info.outputs.pullRequestNumber }}
# labels: "precommit:ok" # labels: "precommit:ok"
# label-lint: label-lint:
# name: Label lint status name: Label lint status
# runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
# if: ${{ github.event.workflow.name == 'Pre-commit consistency check' }} if: ${{ github.event.workflow.name == 'Charts: Lint and tests' }}
# needs: needs:
# - get-info - get-info
# steps: steps:
# - uses: getsentry/action-github-app-token@v1 - uses: getsentry/action-github-app-token@v1
# id: get-app-token id: get-app-token
# with: with:
# app_id: ${{ secrets.K8S_AT_HOME_APP_ID }} app_id: ${{ secrets.K8S_AT_HOME_APP_ID }}
# private_key: ${{ secrets.K8S_AT_HOME_APP_PRIVATE_KEY }} private_key: ${{ secrets.K8S_AT_HOME_APP_PRIVATE_KEY }}
# # CI Passed # CI Passed
# - name: "add label: ok" - name: "add label: ok"
# uses: actions-ecosystem/action-add-labels@v1 uses: actions-ecosystem/action-add-labels@v1
# if: ${{ github.event.workflow_run.conclusion == 'success' }} if: ${{ github.event.workflow_run.conclusion == 'success' }}
# with: with:
# github_token: ${{ steps.get-app-token.outputs.token }} github_token: ${{ steps.get-app-token.outputs.token }}
# number: ${{ needs.get-info.outputs.pullRequestNumber }} number: ${{ needs.get-info.outputs.pullRequestNumber }}
# labels: "precommit:ok" labels: "precommit:ok"
# - name: "remove label: failed" - name: "remove label: failed"
# uses: actions-ecosystem/action-remove-labels@v1 uses: actions-ecosystem/action-remove-labels@v1
# if: ${{ github.event.workflow_run.conclusion == 'success' }} if: ${{ github.event.workflow_run.conclusion == 'success' }}
# with: with:
# github_token: ${{ steps.get-app-token.outputs.token }} github_token: ${{ steps.get-app-token.outputs.token }}
# number: ${{ needs.get-info.outputs.pullRequestNumber }} number: ${{ needs.get-info.outputs.pullRequestNumber }}
# labels: "precommit:failed" labels: "precommit:failed"
# # CI Failed # CI Failed
# - name: "add label: failed" - name: "add label: failed"
# uses: actions-ecosystem/action-add-labels@v1 uses: actions-ecosystem/action-add-labels@v1
# if: ${{ github.event.workflow_run.conclusion == 'failure' }} if: ${{ github.event.workflow_run.conclusion == 'failure' }}
# with: with:
# github_token: ${{ steps.get-app-token.outputs.token }} github_token: ${{ steps.get-app-token.outputs.token }}
# number: ${{ needs.get-info.outputs.pullRequestNumber }} number: ${{ needs.get-info.outputs.pullRequestNumber }}
# labels: "precommit:failed" labels: "precommit:failed"
# - name: "remove label: ok" - name: "remove label: ok"
# uses: actions-ecosystem/action-remove-labels@v1 uses: actions-ecosystem/action-remove-labels@v1
# if: ${{ github.event.workflow_run.conclusion == 'failure' }} if: ${{ github.event.workflow_run.conclusion == 'failure' }}
# with: with:
# github_token: ${{ steps.get-app-token.outputs.token }} github_token: ${{ steps.get-app-token.outputs.token }}
# number: ${{ needs.get-info.outputs.pullRequestNumber }} number: ${{ needs.get-info.outputs.pullRequestNumber }}
# labels: "precommit:ok" labels: "precommit:ok"
# label-precommit:
# name: Label pre-commit status
# runs-on: ubuntu-20.04
# if: ${{ github.event.workflow.name == 'Pre-commit consistency check' }}
# needs:
# - get-info
# steps:
# - uses: getsentry/action-github-app-token@v1
# id: get-app-token
# with:
# app_id: ${{ secrets.K8S_AT_HOME_APP_ID }}
# private_key: ${{ secrets.K8S_AT_HOME_APP_PRIVATE_KEY }}
# # CI Passed
# - name: "add label: ok"
# uses: actions-ecosystem/action-add-labels@v1
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
# with:
# github_token: ${{ steps.get-app-token.outputs.token }}
# number: ${{ needs.get-info.outputs.pullRequestNumber }}
# labels: "precommit:ok"
# - name: "remove label: failed"
# uses: actions-ecosystem/action-remove-labels@v1
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
# with:
# github_token: ${{ steps.get-app-token.outputs.token }}
# number: ${{ needs.get-info.outputs.pullRequestNumber }}
# labels: "precommit: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: "precommit: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: "precommit:ok"