ci: Update workflow formatting, token action

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>
This commit is contained in:
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs 2022-01-21 14:43:14 +01:00
parent 42dbe4ee4a
commit a3582f3c83
No known key found for this signature in database
GPG Key ID: BC5E2BD907F9A8EC
6 changed files with 324 additions and 322 deletions

View File

@ -6,82 +6,82 @@ on:
workflow_dispatch:
push:
branches:
- master
- 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
with:
app_id: ${{ secrets.K8S_AT_HOME_APP_ID }}
private_key: ${{ secrets.K8S_AT_HOME_APP_PRIVATE_KEY }}
- 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 }}
- name: Checkout
uses: actions/checkout@v2
with:
token: ${{ steps.get-app-token.outputs.token }}
ref: master
fetch-depth: 0
- name: Checkout
uses: actions/checkout@v2
with:
token: ${{ steps.generate-token.outputs.token }}
ref: master
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "k8s-at-home[bot]"
git config user.email "k8s-at-home[bot]@users.noreply.github.com"
- name: Configure Git
run: |
git config user.name "k8s-at-home[bot]"
git config user.email "k8s-at-home[bot]@users.noreply.github.com"
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.6.3
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.6.3
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.2.1
with:
charts_dir: charts/*
charts_repo_url: https://k8s-at-home.com/charts/
env:
CR_TOKEN: "${{ steps.get-app-token.outputs.token }}"
CR_SKIP_EXISTING: "true"
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.2.1
with:
charts_dir: charts/*
charts_repo_url: https://k8s-at-home.com/charts/
env:
CR_TOKEN: "${{ steps.generate-token.outputs.token }}"
CR_SKIP_EXISTING: "true"
generate-summary:
name: Auto-generate charts summary
runs-on: ubuntu-20.04
needs:
- release
- release
steps:
- name: Get k8s-at-home token
id: get-app-token
uses: getsentry/action-github-app-token@v1
with:
app_id: ${{ secrets.K8S_AT_HOME_APP_ID }}
private_key: ${{ secrets.K8S_AT_HOME_APP_PRIVATE_KEY }}
- 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 }}
- name: Checkout
uses: actions/checkout@v2
with:
token: ${{ steps.get-app-token.outputs.token }}
ref: master
fetch-depth: 0
- name: Checkout
uses: actions/checkout@v2
with:
token: ${{ steps.generate-token.outputs.token }}
ref: master
fetch-depth: 0
- name: Install yq
uses: chrisdickinson/setup-yq@latest
with:
yq-version: v4.9.3
- name: Install yq
uses: chrisdickinson/setup-yq@latest
with:
yq-version: v4.9.3
- name: Run script
run: |
./hack/gen-chart-summary.sh
- name: Run script
run: |
./hack/gen-chart-summary.sh
- name: Create Commit
uses: stefanzweifel/git-auto-commit-action@v4
with:
push_options: --force
commit_message: Auto-generate chart summary [no ci]
commit_user_name: k8s-at-home[bot]
commit_user_email: k8s-at-home[bot]@users.noreply.github.com
commit_author: k8s-at-home[bot] <k8s-at-home[bot]@users.noreply.github.com>
file_pattern: charts/README.md
- name: Create Commit
uses: stefanzweifel/git-auto-commit-action@v4
with:
push_options: --force
commit_message: Auto-generate chart summary [no ci]
commit_user_name: k8s-at-home[bot]
commit_user_email: k8s-at-home[bot]@users.noreply.github.com
commit_author: k8s-at-home[bot] <k8s-at-home[bot]@users.noreply.github.com>
file_pattern: charts/README.md

View File

@ -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: |
@ -153,25 +153,25 @@ jobs:
always() &&
needs.generate-readme.outputs.commitHash == ''
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.1.0
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.1.0
- name: Run chart-testing (list-changed)
id: list-changed
run: |
EXCLUDED=$(yq eval -o=json '.excluded-charts // []' .github/ct-lint.yaml)
CHARTS=$(ct list-changed --config .github/ct-lint.yaml)
CHARTS_JSON=$(echo "${CHARTS}" | jq -R -s -c 'split("\n")[:-1]')
OUTPUT_JSON=$(echo "{\"excluded\": ${EXCLUDED}, \"all\": ${CHARTS_JSON}}" | jq -c '.all-.excluded')
echo ::set-output name=charts::${OUTPUT_JSON}
if [[ $(echo ${OUTPUT_JSON} | jq -c '. | length') -gt 0 ]]; then
echo "::set-output name=detected::true"
fi
- name: Run chart-testing (list-changed)
id: list-changed
run: |
EXCLUDED=$(yq eval -o=json '.excluded-charts // []' .github/ct-lint.yaml)
CHARTS=$(ct list-changed --config .github/ct-lint.yaml)
CHARTS_JSON=$(echo "${CHARTS}" | jq -R -s -c 'split("\n")[:-1]')
OUTPUT_JSON=$(echo "{\"excluded\": ${EXCLUDED}, \"all\": ${CHARTS_JSON}}" | jq -c '.all-.excluded')
echo ::set-output name=charts::${OUTPUT_JSON}
if [[ $(echo ${OUTPUT_JSON} | jq -c '. | length') -gt 0 ]]; then
echo "::set-output name=detected::true"
fi
changes-install:
name: Detect changes for install
@ -189,99 +189,97 @@ jobs:
always() &&
needs.generate-readme.outputs.commitHash == ''
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.1.0
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.1.0
- name: Run chart-testing (list-changed)
id: list-changed
run: |
EXCLUDED=$(yq eval -o=json '.excluded-charts // []' .github/ct-install.yaml)
CHARTS=$(ct list-changed --config .github/ct-install.yaml)
CHARTS_JSON=$(echo "${CHARTS}" | jq -R -s -c 'split("\n")[:-1]')
OUTPUT_JSON=$(echo "{\"excluded\": ${EXCLUDED}, \"all\": ${CHARTS_JSON}}" | jq -c '.all-.excluded')
echo ::set-output name=charts::${OUTPUT_JSON}
if [[ $(echo ${OUTPUT_JSON} | jq -c '. | length') -gt 0 ]]; then
echo "::set-output name=detected::true"
fi
- name: Run chart-testing (list-changed)
id: list-changed
run: |
EXCLUDED=$(yq eval -o=json '.excluded-charts // []' .github/ct-install.yaml)
CHARTS=$(ct list-changed --config .github/ct-install.yaml)
CHARTS_JSON=$(echo "${CHARTS}" | jq -R -s -c 'split("\n")[:-1]')
OUTPUT_JSON=$(echo "{\"excluded\": ${EXCLUDED}, \"all\": ${CHARTS_JSON}}" | jq -c '.all-.excluded')
echo ::set-output name=charts::${OUTPUT_JSON}
if [[ $(echo ${OUTPUT_JSON} | jq -c '. | length') -gt 0 ]]; then
echo "::set-output name=detected::true"
fi
lint:
needs:
- changes-lint
if:
always() &&
- changes-lint
if: always() &&
needs.changes-lint.outputs.detected == 'true'
name: Lint successful
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.6.3
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.6.3
- uses: actions/setup-python@v2
with:
python-version: 3.7
- uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.1.0
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.1.0
- name: Run chart-testing (lint)
id: lint
run: ct lint --config .github/ct-lint.yaml
- name: Run chart-testing (lint)
id: lint
run: ct lint --config .github/ct-lint.yaml
unittest:
needs:
- lint
- lint
if: |
always() &&
needs.lint.result == 'success'
name: Run unit tests
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Dev tools
run: sudo apt-get update && sudo apt-get install -y jq libjq-dev
- name: Install Dev tools
run: sudo apt-get update && sudo apt-get install -y jq libjq-dev
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.6.3
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.6.3
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- name: Install dependencies
env:
RUBYJQ_USE_SYSTEM_LIBRARIES: 1
run: |
bundle install
- name: Install dependencies
env:
RUBYJQ_USE_SYSTEM_LIBRARIES: 1
run: |
bundle install
- name: Run tests
run: |
bundle exec m -r ./test/
- name: Run tests
run: |
bundle exec m -r ./test/
install:
needs:
- changes-install
- lint
if:
always() &&
- changes-install
- lint
if: always() &&
needs.lint.result == 'success' &&
needs.changes-install.outputs.detected == 'true'
name: Install charts
@ -291,46 +289,46 @@ jobs:
max-parallel: 15
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.6.3
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.6.3
- uses: actions/setup-python@v2
with:
python-version: 3.7
- uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.1.0
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.1.0
- name: Create k3d cluster
uses: nolar/setup-k3d-k3s@v1
with:
version: v1.19
- name: Create k3d cluster
uses: nolar/setup-k3d-k3s@v1
with:
version: v1.19
- name: Remove node taints
run: |
kubectl taint --all=true nodes node.cloudprovider.kubernetes.io/uninitialized- || true
- name: Remove node taints
run: |
kubectl taint --all=true nodes node.cloudprovider.kubernetes.io/uninitialized- || true
- name: Run chart-testing (install)
run: ct install --config .github/ct-install.yaml --charts ${{ matrix.chart }}
- name: Run chart-testing (install)
run: ct install --config .github/ct-install.yaml --charts ${{ matrix.chart }}
# Summarize matrix https://github.community/t/status-check-for-a-matrix-jobs/127354/7
install_success:
needs:
- changes-install
- install
- changes-install
- install
if: |
always() &&
needs.install.result != 'skipped'
name: Install successful
runs-on: ubuntu-20.04
steps:
- name: Check install matrix status
if: ${{ needs.changes-install.outputs.detected == 'true' && needs.install.result != 'success' }}
run: exit 1
- name: Check install matrix status
if: ${{ needs.changes-install.outputs.detected == 'true' && needs.install.result != 'success' }}
run: exit 1

View File

@ -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
with:
app_id: ${{ secrets.K8S_AT_HOME_APP_ID }}
private_key: ${{ secrets.K8S_AT_HOME_APP_PRIVATE_KEY }}
- 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 }}
ref: master
- uses: actions/checkout@v2
with:
token: ${{ steps.generate-token.outputs.token }}
ref: master
- uses: peaceiris/actions-label-commenter@v1
with:
github_token: ${{ steps.get-app-token.outputs.token }}
- uses: peaceiris/actions-label-commenter@v1
with:
github_token: ${{ steps.generate-token.outputs.token }}

View File

@ -22,50 +22,51 @@ jobs:
name: Label issues and pull requests
runs-on: ubuntu-20.04
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: 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 }}
configJSON: |
{
"releaseMastermind": {
"labels": {
"kind:incorrect-title": {
"name": "kind:incorrect-title",
"colour": "#ffb700",
"description": "Incorrect title"
}
},
"runners": [
{
"root": ".",
"versioning": {
"source": "milestones",
"type": "other"
},
"pr": {
"labels": {
"kind:incorrect-title": {
"requires": 2,
"conditions": [
{
"type": "creatorMatches",
"pattern": "^(?!renovate).+"
},
{
"type": "titleMatches",
"pattern": "^(?!\\[[a-z0-9\\-]+\\]\\s.+).+"
}
]
- uses: Videndum/label-mastermind@2.1.3
with:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
configJSON: |
{
"releaseMastermind": {
"labels": {
"kind:incorrect-title": {
"name": "kind:incorrect-title",
"colour": "#ffb700",
"description": "Incorrect title"
}
},
"runners": [
{
"root": ".",
"versioning": {
"source": "milestones",
"type": "other"
},
"pr": {
"labels": {
"kind:incorrect-title": {
"requires": 2,
"conditions": [
{
"type": "creatorMatches",
"pattern": "^(?!renovate).+"
},
{
"type": "titleMatches",
"pattern": "^(?!\\[[a-z0-9\\-]+\\]\\s.+).+"
}
]
}
}
}
}
}
]
]
}
}
}

View File

@ -4,10 +4,10 @@ name: "Metadata: Label pull requests CI status"
on:
workflow_run:
workflows:
- "Pre-commit consistency check"
- "Charts: Validate"
- "Pre-commit consistency check"
- "Charts: Validate"
types:
- completed
- completed
jobs:
label-precommit:
@ -15,112 +15,114 @@ 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
with:
app_id: ${{ secrets.K8S_AT_HOME_APP_ID }}
private_key: ${{ secrets.K8S_AT_HOME_APP_PRIVATE_KEY }}
- 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 }}
- name: "Get information about the origin 'CI' run"
uses: potiuk/get-workflow-origin@v1_3
id: source-run-info
with:
token: ${{ steps.get-app-token.outputs.token }}
sourceRunId: ${{ github.event.workflow_run.id }}
- name: "Get information about the origin 'CI' run"
uses: potiuk/get-workflow-origin@v1_3
id: source-run-info
with:
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 }}
issue-number: ${{ steps.source-run-info.outputs.pullRequestNumber }}
add-labels: "precommit:ok"
remove-labels: "precommit:failed"
- name: Label precommit success
uses: andymckay/labeler@1.0.4
if: ${{ github.event.workflow_run.conclusion == 'success' }}
with:
repo-token: ${{ steps.generate-token.outputs.token }}
issue-number: ${{ steps.source-run-info.outputs.pullRequestNumber }}
add-labels: "precommit:ok"
remove-labels: "precommit:failed"
- name: Label precommit failure
uses: andymckay/labeler@1.0.4
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
with:
repo-token: ${{ steps.get-app-token.outputs.token }}
issue-number: ${{ steps.source-run-info.outputs.pullRequestNumber }}
add-labels: "precommit:failed"
remove-labels: "precommit:ok"
- name: Label precommit failure
uses: andymckay/labeler@1.0.4
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
with:
repo-token: ${{ steps.generate-token.outputs.token }}
issue-number: ${{ steps.source-run-info.outputs.pullRequestNumber }}
add-labels: "precommit:failed"
remove-labels: "precommit:ok"
label-lint-install:
name: Label lint and install status
runs-on: ubuntu-20.04
if: "${{ github.event.workflow.name == 'Charts: Validate' }}"
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: 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 }}
- name: "Get information about the origin 'CI' run"
uses: potiuk/get-workflow-origin@v1_3
id: source-run-info
with:
token: ${{ steps.get-app-token.outputs.token }}
sourceRunId: ${{ github.event.workflow_run.id }}
- name: "Get information about the origin 'CI' run"
uses: potiuk/get-workflow-origin@v1_3
id: source-run-info
with:
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 }}
script: |
let result = new Object
- name: "Get workflow job status"
uses: actions/github-script@v5
id: get-workflow-jobs
with:
github-token: ${{ steps.generate-token.outputs.token }}
script: |
let result = new Object
const wfJobs = await github.rest.actions.listJobsForWorkflowRun({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.payload.workflow_run.id,
})
const wfJobs = await github.rest.actions.listJobsForWorkflowRun({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.payload.workflow_run.id,
})
for (const job of wfJobs.data.jobs) {
if (job.name === 'Lint successful') {
result['lint'] = job.conclusion
} else if (job.name === 'Install successful') {
result['install'] = job.conclusion
for (const job of wfJobs.data.jobs) {
if (job.name === 'Lint successful') {
result['lint'] = job.conclusion
} else if (job.name === 'Install successful') {
result['install'] = job.conclusion
}
}
}
console.log(result)
return result
console.log(result)
return result
- name: Label lint success
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 }}
issue-number: ${{ steps.source-run-info.outputs.pullRequestNumber }}
add-labels: "lint:ok"
remove-labels: "lint:failed"
- name: Label lint success
uses: andymckay/labeler@1.0.4
if: ${{ fromJSON(steps.get-workflow-jobs.outputs.result).lint == 'success' }}
with:
repo-token: ${{ steps.generate-token.outputs.token }}
issue-number: ${{ steps.source-run-info.outputs.pullRequestNumber }}
add-labels: "lint:ok"
remove-labels: "lint:failed"
- name: Label lint failure
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 }}
issue-number: ${{ steps.source-run-info.outputs.pullRequestNumber }}
add-labels: "lint:failed"
remove-labels: "lint:ok"
- name: Label lint failure
uses: andymckay/labeler@1.0.4
if: ${{ fromJSON(steps.get-workflow-jobs.outputs.result).lint == 'failure' }}
with:
repo-token: ${{ steps.generate-token.outputs.token }}
issue-number: ${{ steps.source-run-info.outputs.pullRequestNumber }}
add-labels: "lint:failed"
remove-labels: "lint:ok"
- name: Label install success
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 }}
issue-number: ${{ steps.source-run-info.outputs.pullRequestNumber }}
add-labels: "install:ok"
remove-labels: "install:failed"
- name: Label install success
uses: andymckay/labeler@1.0.4
if: ${{ fromJSON(steps.get-workflow-jobs.outputs.result).install == 'success' }}
with:
repo-token: ${{ steps.generate-token.outputs.token }}
issue-number: ${{ steps.source-run-info.outputs.pullRequestNumber }}
add-labels: "install:ok"
remove-labels: "install:failed"
- name: Label install failure
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 }}
issue-number: ${{ steps.source-run-info.outputs.pullRequestNumber }}
add-labels: "install:failed"
remove-labels: "install:ok"
- name: Label install failure
uses: andymckay/labeler@1.0.4
if: ${{ fromJSON(steps.get-workflow-jobs.outputs.result).install == 'failure' }}
with:
repo-token: ${{ steps.generate-token.outputs.token }}
issue-number: ${{ steps.source-run-info.outputs.pullRequestNumber }}
add-labels: "install:failed"
remove-labels: "install:ok"

View File

@ -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