ci: CI Fixes

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>
This commit is contained in:
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs 2022-02-04 08:25:53 +01:00
parent 5e5f23c69d
commit 54f9b87b70
No known key found for this signature in database
GPG Key ID: BC5E2BD907F9A8EC
2 changed files with 43 additions and 25 deletions

View File

@ -23,12 +23,18 @@ jobs:
app_id: ${{ secrets.K8S_AT_HOME_APP_ID }}
private_key: ${{ secrets.K8S_AT_HOME_APP_PRIVATE_KEY }}
- name: "Get information about the origin 'CI' run"
uses: potiuk/get-workflow-origin@v1_3
id: source-run-info
- name: Download workflow artifact
uses: dawidd6/action-download-artifact@v2.11.0
with:
token: ${{ steps.generate-token.outputs.token }}
sourceRunId: ${{ github.event.workflow_run.id }}
github_token: ${{ steps.generate-token.outputs.token }}
workflow: pr-validate.yaml
run_id: ${{ github.event.workflow_run.id }}
- name: Read the pr_number file
id: pr_num_reader
uses: juliangruber/read-file-action@v1.0.0
with:
path: ./pr_number/pr_number.txt
- name: "Get workflow job status"
uses: actions/github-script@v5
@ -71,7 +77,7 @@ jobs:
uses: ./.github/actions/label-from-status
with:
token: ${{ steps.generate-token.outputs.token }}
issue-number: ${{ steps.source-run-info.outputs.pullRequestNumber }}
issue-number: ${{ steps.pr_num_reader.outputs.content }}
prefix: precommit
job-status: |-
${{ fromJSON(steps.get-workflow-jobs.outputs.result).pre-commit-check-run-pre-commit-checks || 'skipped' }}
@ -81,28 +87,28 @@ jobs:
uses: ./.github/actions/label-from-status
with:
token: ${{ steps.generate-token.outputs.token }}
issue-number: ${{ steps.source-run-info.outputs.pullRequestNumber }}
issue-number: ${{ steps.pr_num_reader.outputs.content }}
prefix: changelog
job-status: |-
${{ fromJSON(steps.get-workflow-jobs.outputs.result).charts-readme-validate-changelog || 'skipped' }}
remove-on-skipped: true
# - name: Label lint status
# uses: ./.github/actions/label-from-status
# with:
# token: ${{ steps.generate-token.outputs.token }}
# issue-number: ${{ steps.source-run-info.outputs.pullRequestNumber }}
# prefix: lint
# job-status: |-
# ${{ fromJSON(steps.get-workflow-jobs.outputs.result).lint || 'skipped' }}
# remove-on-skipped: true
- name: Label chart lint status
uses: ./.github/actions/label-from-status
with:
token: ${{ steps.generate-token.outputs.token }}
issue-number: ${{ steps.pr_num_reader.outputs.content }}
prefix: lint
job-status: |-
${{ fromJSON(steps.get-workflow-jobs.outputs.result).charts-lint-lint-charts || 'skipped' }}
remove-on-skipped: true
# - name: Label install status
# uses: ./.github/actions/label-from-status
# with:
# token: ${{ steps.generate-token.outputs.token }}
# issue-number: ${{ steps.source-run-info.outputs.pullRequestNumber }}
# prefix: lint
# job-status: |-
# ${{ fromJSON(steps.get-workflow-jobs.outputs.result).lint || 'skipped' }}
# remove-on-skipped: true
- name: Label chart install status
uses: ./.github/actions/label-from-status
with:
token: ${{ steps.generate-token.outputs.token }}
issue-number: ${{ steps.pr_num_reader.outputs.content }}
prefix: install
job-status: |-
${{ fromJSON(steps.get-workflow-jobs.outputs.result).charts-test-install-successful || 'skipped' }}
remove-on-skipped: true

View File

@ -31,6 +31,18 @@ jobs:
id: branch-name
uses: tj-actions/branch-names@v5.1
- name: Save PR data to file
env:
PR_NUMBER: ${{ github.event.number }}
run: |
echo $PR_NUMBER > pr_number.txt
- name: Store pr data in artifact
uses: actions/upload-artifact@v2
with:
name: pr_number
path: ./pr_number.txt
pr-changes:
name: Collect PR changes
runs-on: ubuntu-latest