mirror of
https://github.com/k8s-at-home/charts.git
synced 2025-01-23 23:49:12 +00:00
ci: Update workflow formatting, token action
Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>
This commit is contained in:
parent
42dbe4ee4a
commit
a3582f3c83
20
.github/workflows/charts-release.yaml
vendored
20
.github/workflows/charts-release.yaml
vendored
@ -8,15 +8,15 @@ on:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- 'charts/**'
|
||||
- "charts/**"
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Get k8s-at-home token
|
||||
id: get-app-token
|
||||
uses: getsentry/action-github-app-token@v1
|
||||
- name: Generate Token
|
||||
uses: tibdex/github-app-token@v1
|
||||
id: generate-token
|
||||
with:
|
||||
app_id: ${{ secrets.K8S_AT_HOME_APP_ID }}
|
||||
private_key: ${{ secrets.K8S_AT_HOME_APP_PRIVATE_KEY }}
|
||||
@ -24,7 +24,7 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
token: ${{ steps.get-app-token.outputs.token }}
|
||||
token: ${{ steps.generate-token.outputs.token }}
|
||||
ref: master
|
||||
fetch-depth: 0
|
||||
|
||||
@ -44,7 +44,7 @@ jobs:
|
||||
charts_dir: charts/*
|
||||
charts_repo_url: https://k8s-at-home.com/charts/
|
||||
env:
|
||||
CR_TOKEN: "${{ steps.get-app-token.outputs.token }}"
|
||||
CR_TOKEN: "${{ steps.generate-token.outputs.token }}"
|
||||
CR_SKIP_EXISTING: "true"
|
||||
|
||||
generate-summary:
|
||||
@ -53,9 +53,9 @@ jobs:
|
||||
needs:
|
||||
- release
|
||||
steps:
|
||||
- name: Get k8s-at-home token
|
||||
id: get-app-token
|
||||
uses: getsentry/action-github-app-token@v1
|
||||
- name: Generate Token
|
||||
uses: tibdex/github-app-token@v1
|
||||
id: generate-token
|
||||
with:
|
||||
app_id: ${{ secrets.K8S_AT_HOME_APP_ID }}
|
||||
private_key: ${{ secrets.K8S_AT_HOME_APP_PRIVATE_KEY }}
|
||||
@ -63,7 +63,7 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
token: ${{ steps.get-app-token.outputs.token }}
|
||||
token: ${{ steps.generate-token.outputs.token }}
|
||||
ref: master
|
||||
fetch-depth: 0
|
||||
|
||||
|
14
.github/workflows/charts-validate.yaml
vendored
14
.github/workflows/charts-validate.yaml
vendored
@ -66,9 +66,9 @@ jobs:
|
||||
if: |
|
||||
needs.pr-metadata.outputs.isFork == 'false'
|
||||
steps:
|
||||
- name: Get app-token
|
||||
uses: getsentry/action-github-app-token@v1
|
||||
id: get-app-token
|
||||
- name: Generate Token
|
||||
uses: tibdex/github-app-token@v1
|
||||
id: generate-token
|
||||
with:
|
||||
app_id: ${{ secrets.K8S_AT_HOME_APP_ID }}
|
||||
private_key: ${{ secrets.K8S_AT_HOME_APP_PRIVATE_KEY }}
|
||||
@ -77,7 +77,7 @@ jobs:
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ steps.get-app-token.outputs.token }}
|
||||
token: ${{ steps.generate-token.outputs.token }}
|
||||
|
||||
- uses: yokawasa/action-setup-kube-tools@v0.8.0
|
||||
if: |
|
||||
@ -212,8 +212,7 @@ jobs:
|
||||
lint:
|
||||
needs:
|
||||
- changes-lint
|
||||
if:
|
||||
always() &&
|
||||
if: always() &&
|
||||
needs.changes-lint.outputs.detected == 'true'
|
||||
name: Lint successful
|
||||
runs-on: ubuntu-20.04
|
||||
@ -280,8 +279,7 @@ jobs:
|
||||
needs:
|
||||
- changes-install
|
||||
- lint
|
||||
if:
|
||||
always() &&
|
||||
if: always() &&
|
||||
needs.lint.result == 'success' &&
|
||||
needs.changes-install.outputs.detected == 'true'
|
||||
name: Install charts
|
||||
|
11
.github/workflows/metadata-label-commenter.yaml
vendored
11
.github/workflows/metadata-label-commenter.yaml
vendored
@ -1,5 +1,5 @@
|
||||
---
|
||||
name: 'Metadata: Label Commenter'
|
||||
name: "Metadata: Label Commenter"
|
||||
|
||||
on:
|
||||
issues:
|
||||
@ -21,17 +21,18 @@ jobs:
|
||||
name: Label commenter
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: getsentry/action-github-app-token@v1
|
||||
id: get-app-token
|
||||
- name: Generate Token
|
||||
uses: tibdex/github-app-token@v1
|
||||
id: generate-token
|
||||
with:
|
||||
app_id: ${{ secrets.K8S_AT_HOME_APP_ID }}
|
||||
private_key: ${{ secrets.K8S_AT_HOME_APP_PRIVATE_KEY }}
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
token: ${{ steps.get-app-token.outputs.token }}
|
||||
token: ${{ steps.generate-token.outputs.token }}
|
||||
ref: master
|
||||
|
||||
- uses: peaceiris/actions-label-commenter@v1
|
||||
with:
|
||||
github_token: ${{ steps.get-app-token.outputs.token }}
|
||||
github_token: ${{ steps.generate-token.outputs.token }}
|
||||
|
@ -22,15 +22,16 @@ jobs:
|
||||
name: Label issues and pull requests
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: getsentry/action-github-app-token@v1
|
||||
id: get-app-token
|
||||
- name: Generate Token
|
||||
uses: tibdex/github-app-token@v1
|
||||
id: generate-token
|
||||
with:
|
||||
app_id: ${{ secrets.K8S_AT_HOME_APP_ID }}
|
||||
private_key: ${{ secrets.K8S_AT_HOME_APP_PRIVATE_KEY }}
|
||||
|
||||
- uses: Videndum/label-mastermind@2.1.3
|
||||
with:
|
||||
GITHUB_TOKEN: ${{ steps.get-app-token.outputs.token }}
|
||||
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
|
||||
configJSON: |
|
||||
{
|
||||
"releaseMastermind": {
|
||||
|
@ -15,8 +15,9 @@ jobs:
|
||||
runs-on: ubuntu-20.04
|
||||
if: "${{ github.event.workflow.name == 'Pre-commit consistency check' }}"
|
||||
steps:
|
||||
- uses: getsentry/action-github-app-token@v1
|
||||
id: get-app-token
|
||||
- name: Generate Token
|
||||
uses: tibdex/github-app-token@v1
|
||||
id: generate-token
|
||||
with:
|
||||
app_id: ${{ secrets.K8S_AT_HOME_APP_ID }}
|
||||
private_key: ${{ secrets.K8S_AT_HOME_APP_PRIVATE_KEY }}
|
||||
@ -25,14 +26,14 @@ jobs:
|
||||
uses: potiuk/get-workflow-origin@v1_3
|
||||
id: source-run-info
|
||||
with:
|
||||
token: ${{ steps.get-app-token.outputs.token }}
|
||||
token: ${{ steps.generate-token.outputs.token }}
|
||||
sourceRunId: ${{ github.event.workflow_run.id }}
|
||||
|
||||
- name: Label precommit success
|
||||
uses: andymckay/labeler@1.0.4
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
with:
|
||||
repo-token: ${{ steps.get-app-token.outputs.token }}
|
||||
repo-token: ${{ steps.generate-token.outputs.token }}
|
||||
issue-number: ${{ steps.source-run-info.outputs.pullRequestNumber }}
|
||||
add-labels: "precommit:ok"
|
||||
remove-labels: "precommit:failed"
|
||||
@ -41,7 +42,7 @@ jobs:
|
||||
uses: andymckay/labeler@1.0.4
|
||||
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
|
||||
with:
|
||||
repo-token: ${{ steps.get-app-token.outputs.token }}
|
||||
repo-token: ${{ steps.generate-token.outputs.token }}
|
||||
issue-number: ${{ steps.source-run-info.outputs.pullRequestNumber }}
|
||||
add-labels: "precommit:failed"
|
||||
remove-labels: "precommit:ok"
|
||||
@ -51,8 +52,9 @@ jobs:
|
||||
runs-on: ubuntu-20.04
|
||||
if: "${{ github.event.workflow.name == 'Charts: Validate' }}"
|
||||
steps:
|
||||
- uses: getsentry/action-github-app-token@v1
|
||||
id: get-app-token
|
||||
- name: Generate Token
|
||||
uses: tibdex/github-app-token@v1
|
||||
id: generate-token
|
||||
with:
|
||||
app_id: ${{ secrets.K8S_AT_HOME_APP_ID }}
|
||||
private_key: ${{ secrets.K8S_AT_HOME_APP_PRIVATE_KEY }}
|
||||
@ -61,14 +63,14 @@ jobs:
|
||||
uses: potiuk/get-workflow-origin@v1_3
|
||||
id: source-run-info
|
||||
with:
|
||||
token: ${{ steps.get-app-token.outputs.token }}
|
||||
token: ${{ steps.generate-token.outputs.token }}
|
||||
sourceRunId: ${{ github.event.workflow_run.id }}
|
||||
|
||||
- name: "Get workflow job status"
|
||||
uses: actions/github-script@v5
|
||||
id: get-workflow-jobs
|
||||
with:
|
||||
github-token: ${{ steps.get-app-token.outputs.token }}
|
||||
github-token: ${{ steps.generate-token.outputs.token }}
|
||||
script: |
|
||||
let result = new Object
|
||||
|
||||
@ -93,7 +95,7 @@ jobs:
|
||||
uses: andymckay/labeler@1.0.4
|
||||
if: ${{ fromJSON(steps.get-workflow-jobs.outputs.result).lint == 'success' }}
|
||||
with:
|
||||
repo-token: ${{ steps.get-app-token.outputs.token }}
|
||||
repo-token: ${{ steps.generate-token.outputs.token }}
|
||||
issue-number: ${{ steps.source-run-info.outputs.pullRequestNumber }}
|
||||
add-labels: "lint:ok"
|
||||
remove-labels: "lint:failed"
|
||||
@ -102,7 +104,7 @@ jobs:
|
||||
uses: andymckay/labeler@1.0.4
|
||||
if: ${{ fromJSON(steps.get-workflow-jobs.outputs.result).lint == 'failure' }}
|
||||
with:
|
||||
repo-token: ${{ steps.get-app-token.outputs.token }}
|
||||
repo-token: ${{ steps.generate-token.outputs.token }}
|
||||
issue-number: ${{ steps.source-run-info.outputs.pullRequestNumber }}
|
||||
add-labels: "lint:failed"
|
||||
remove-labels: "lint:ok"
|
||||
@ -111,7 +113,7 @@ jobs:
|
||||
uses: andymckay/labeler@1.0.4
|
||||
if: ${{ fromJSON(steps.get-workflow-jobs.outputs.result).install == 'success' }}
|
||||
with:
|
||||
repo-token: ${{ steps.get-app-token.outputs.token }}
|
||||
repo-token: ${{ steps.generate-token.outputs.token }}
|
||||
issue-number: ${{ steps.source-run-info.outputs.pullRequestNumber }}
|
||||
add-labels: "install:ok"
|
||||
remove-labels: "install:failed"
|
||||
@ -120,7 +122,7 @@ jobs:
|
||||
uses: andymckay/labeler@1.0.4
|
||||
if: ${{ fromJSON(steps.get-workflow-jobs.outputs.result).install == 'failure' }}
|
||||
with:
|
||||
repo-token: ${{ steps.get-app-token.outputs.token }}
|
||||
repo-token: ${{ steps.generate-token.outputs.token }}
|
||||
issue-number: ${{ steps.source-run-info.outputs.pullRequestNumber }}
|
||||
add-labels: "install:failed"
|
||||
remove-labels: "install:ok"
|
||||
|
8
.github/workflows/stale.yaml
vendored
8
.github/workflows/stale.yaml
vendored
@ -10,9 +10,9 @@ jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Get app-token
|
||||
uses: getsentry/action-github-app-token@v1
|
||||
id: get-app-token
|
||||
- name: Generate Token
|
||||
uses: tibdex/github-app-token@v1
|
||||
id: generate-token
|
||||
with:
|
||||
app_id: ${{ secrets.K8S_AT_HOME_APP_ID }}
|
||||
private_key: ${{ secrets.K8S_AT_HOME_APP_PRIVATE_KEY }}
|
||||
@ -20,7 +20,7 @@ jobs:
|
||||
- name: Check for stale issues and PRs
|
||||
uses: actions/stale@v4
|
||||
with:
|
||||
repo-token: ${{ steps.get-app-token.outputs.token }}
|
||||
repo-token: ${{ steps.generate-token.outputs.token }}
|
||||
days-before-issue-stale: 60
|
||||
days-before-pr-stale: 60
|
||||
days-before-close: 14
|
||||
|
Loading…
Reference in New Issue
Block a user