mirror of
https://github.com/k8s-at-home/charts.git
synced 2025-01-23 23:49:12 +00:00
ci: Fix CI checks for forks
Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>
This commit is contained in:
parent
a5b459cdfc
commit
849709775d
87
.github/workflows/charts-lint-test.yaml
vendored
87
.github/workflows/charts-lint-test.yaml
vendored
@ -92,16 +92,9 @@ jobs:
|
|||||||
name: Lint charts
|
name: Lint charts
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
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 }}
|
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
token: ${{ steps.get-app-token.outputs.token }}
|
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Install Helm
|
- name: Install Helm
|
||||||
@ -120,52 +113,15 @@ jobs:
|
|||||||
id: lint
|
id: lint
|
||||||
run: ct lint --config .github/ct-lint.yaml
|
run: ct lint --config .github/ct-lint.yaml
|
||||||
|
|
||||||
# CI Passed
|
|
||||||
- name: "add label: ok"
|
|
||||||
uses: actions-ecosystem/action-add-labels@v1
|
|
||||||
if: ${{ success() }}
|
|
||||||
with:
|
|
||||||
github_token: ${{ steps.get-app-token.outputs.token }}
|
|
||||||
labels: "lint:ok"
|
|
||||||
|
|
||||||
- name: "remove label: failed"
|
|
||||||
uses: actions-ecosystem/action-remove-labels@v1
|
|
||||||
if: ${{ success() }}
|
|
||||||
with:
|
|
||||||
github_token: ${{ steps.get-app-token.outputs.token }}
|
|
||||||
labels: "lint:failed"
|
|
||||||
|
|
||||||
# CI Failed
|
|
||||||
- name: "add label: failed"
|
|
||||||
uses: actions-ecosystem/action-add-labels@v1
|
|
||||||
if: ${{ failure() }}
|
|
||||||
with:
|
|
||||||
github_token: ${{ steps.get-app-token.outputs.token }}
|
|
||||||
labels: "lint:failed"
|
|
||||||
|
|
||||||
- name: "remove label: ok"
|
|
||||||
uses: actions-ecosystem/action-remove-labels@v1
|
|
||||||
if: ${{ failure() }}
|
|
||||||
with:
|
|
||||||
github_token: ${{ steps.get-app-token.outputs.token }}
|
|
||||||
labels: "lint:ok"
|
|
||||||
|
|
||||||
unittest:
|
unittest:
|
||||||
needs:
|
needs:
|
||||||
- lint
|
- lint
|
||||||
name: Run unit tests
|
name: Run unit tests
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
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 }}
|
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
token: ${{ steps.get-app-token.outputs.token }}
|
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Install Dev tools
|
- name: Install Dev tools
|
||||||
@ -204,16 +160,9 @@ jobs:
|
|||||||
max-parallel: 15
|
max-parallel: 15
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
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 }}
|
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
token: ${{ steps.get-app-token.outputs.token }}
|
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Install Helm
|
- name: Install Helm
|
||||||
@ -249,42 +198,6 @@ jobs:
|
|||||||
name: Install successful
|
name: Install successful
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
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 }}
|
|
||||||
|
|
||||||
- name: Check install matrix status
|
- name: Check install matrix status
|
||||||
if: ${{ needs.changes-install.outputs.detected == 'true' && needs.install.result != 'success' }}
|
if: ${{ needs.changes-install.outputs.detected == 'true' && needs.install.result != 'success' }}
|
||||||
run: exit 1
|
run: exit 1
|
||||||
|
|
||||||
# CI Passed
|
|
||||||
- name: "add label: ok"
|
|
||||||
uses: actions-ecosystem/action-add-labels@v1
|
|
||||||
if: ${{ success() }}
|
|
||||||
with:
|
|
||||||
github_token: ${{ steps.get-app-token.outputs.token }}
|
|
||||||
labels: "install:ok"
|
|
||||||
|
|
||||||
- name: "remove label: failed"
|
|
||||||
uses: actions-ecosystem/action-remove-labels@v1
|
|
||||||
if: ${{ success() }}
|
|
||||||
with:
|
|
||||||
github_token: ${{ steps.get-app-token.outputs.token }}
|
|
||||||
labels: "install:failed"
|
|
||||||
|
|
||||||
# CI Failed
|
|
||||||
- name: "add label: failed"
|
|
||||||
uses: actions-ecosystem/action-add-labels@v1
|
|
||||||
if: ${{ failure() }}
|
|
||||||
with:
|
|
||||||
github_token: ${{ steps.get-app-token.outputs.token }}
|
|
||||||
labels: "install:failed"
|
|
||||||
|
|
||||||
- name: "remove label: ok"
|
|
||||||
uses: actions-ecosystem/action-remove-labels@v1
|
|
||||||
if: ${{ failure() }}
|
|
||||||
with:
|
|
||||||
github_token: ${{ steps.get-app-token.outputs.token }}
|
|
||||||
labels: "install:ok"
|
|
||||||
|
53
.github/workflows/metadata-label-pr-ci-status.yaml
vendored
Normal file
53
.github/workflows/metadata-label-pr-ci-status.yaml
vendored
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
---
|
||||||
|
name: "Metadata: Label pull requests CI status"
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_run:
|
||||||
|
workflows:
|
||||||
|
- "Pre-commit consistency check"
|
||||||
|
types:
|
||||||
|
- completed
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
label-precommit:
|
||||||
|
name: Label pre-commit status
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||||
|
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 }}
|
||||||
|
|
||||||
|
- uses: hmarr/debug-action@v2
|
||||||
|
|
||||||
|
# # 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 }}
|
||||||
|
# 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 }}
|
||||||
|
# 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 }}
|
||||||
|
# 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 }}
|
||||||
|
# labels: "precommit:ok"
|
37
.github/workflows/pre-commit-check.yaml
vendored
37
.github/workflows/pre-commit-check.yaml
vendored
@ -13,16 +13,9 @@ jobs:
|
|||||||
name: Run pre-commit checks
|
name: Run pre-commit checks
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
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 }}
|
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
token: ${{ steps.get-app-token.outputs.token }}
|
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- uses: dorny/paths-filter@v2
|
- uses: dorny/paths-filter@v2
|
||||||
@ -46,33 +39,3 @@ jobs:
|
|||||||
if: steps.filter.outputs.addedOrModified != 'true'
|
if: steps.filter.outputs.addedOrModified != 'true'
|
||||||
with:
|
with:
|
||||||
extra_args: --all-files
|
extra_args: --all-files
|
||||||
|
|
||||||
# CI Passed
|
|
||||||
- name: "add label: ok"
|
|
||||||
uses: actions-ecosystem/action-add-labels@v1
|
|
||||||
if: ${{ success() }}
|
|
||||||
with:
|
|
||||||
github_token: ${{ steps.get-app-token.outputs.token }}
|
|
||||||
labels: "precommit:ok"
|
|
||||||
|
|
||||||
- name: "remove label: failed"
|
|
||||||
uses: actions-ecosystem/action-remove-labels@v1
|
|
||||||
if: ${{ success() }}
|
|
||||||
with:
|
|
||||||
github_token: ${{ steps.get-app-token.outputs.token }}
|
|
||||||
labels: "precommit:failed"
|
|
||||||
|
|
||||||
# CI Failed
|
|
||||||
- name: "add label: failed"
|
|
||||||
uses: actions-ecosystem/action-add-labels@v1
|
|
||||||
if: ${{ failure() }}
|
|
||||||
with:
|
|
||||||
github_token: ${{ steps.get-app-token.outputs.token }}
|
|
||||||
labels: "precommit:failed"
|
|
||||||
|
|
||||||
- name: "remove label: ok"
|
|
||||||
uses: actions-ecosystem/action-remove-labels@v1
|
|
||||||
if: ${{ failure() }}
|
|
||||||
with:
|
|
||||||
github_token: ${{ steps.get-app-token.outputs.token }}
|
|
||||||
labels: "precommit:ok"
|
|
||||||
|
Loading…
Reference in New Issue
Block a user