diff --git a/.github/labels.yaml b/.github/labels.yaml new file mode 100644 index 00000000..3fe9e211 --- /dev/null +++ b/.github/labels.yaml @@ -0,0 +1,111 @@ +--- +# CI Status +- name: "precommit:ok" + color: "0E8A16" + description: >- + CI status: pre-commit validation successful +- name: "precommit:failed" + color: "D93F0B" + description: >- + CI status: pre-commit validation failed +- name: "changelog:ok" + color: "0E8A16" + description: >- + CI status: changelog validation successful +- name: "changelog:failed" + color: "D93F0B" + description: >- + CI status: changelog validation failed +- name: "lint:ok" + color: "0E8A16" + description: >- + CI status: linting successful +- name: "lint:failed" + color: "D93F0B" + description: >- + CI status: linting failed +- name: "install:ok" + color: "0E8A16" + description: >- + CI status: install successful +- name: "install:failed" + color: "D93F0B" + description: >- + CI status: install failed + +# Semantic Type +- name: type/patch + color: "FFEC19" +- name: type/minor + color: "FF9800" +- name: type/major + color: "F6412D" + +# Renovate +- name: renovate/container + color: "ffc300" +- name: renovate/helm + color: "ffc300" + +# Size +- name: size/XS + color: "009900" + description: >- + Categorises a PR that changes 0-9 lines, ignoring generated files. +- name: size/S + color: "77bb00" + description: >- + Categorises a PR that changes 10-29 lines, ignoring generated files. +- name: size/M + color: "eebb00" + description: >- + Categorises a PR that changes 30-99 lines, ignoring generated files. +- name: size/L + color: "ee9900" + description: >- + Categorises a PR that changes 100-499 lines, ignoring generated files. +- name: size/XL + color: "ee5500" + description: >- + Categorises a PR that changes 500-999 lines, ignoring generated files. +- name: size/XXL + color: "ee0000" + description: >- + Categorises a PR that changes 1000+ lines, ignoring generated files. + +# Issue categories +- name: documentation + color: "0075ca" +- name: bug + color: "B60205" +- name: enhancement + color: "a2eeef" +- name: "help wanted" + color: "008672" +- name: wontfix + color: "ffffff" +- name: "support" + color: ffffff +- name: "incomplete-template" + color: ffffff + +- name: "new-chart" + color: "C2E0C6" + description: >- + Categorises a PR or issue that references a new Helm chart. +- name: do-not-merge + color: "ee0701" + description: >- + Categorises a PR that should not be merged in the current state. +- name: "incomplete-docs" + color: B72175 + description: >- + Categorises a PR for which the documentation has not been updated completely. +- name: keepalive + color: "4D28C4" + description: >- + Categorises a PR or issue that should not be marked as stale. +- name: stale + color: "D4C5F9" + description: >- + Categorises a PR or issue that has not been active for a specified time. diff --git a/.github/workflows/charts-test.yaml b/.github/workflows/charts-test.yaml index e481f68f..37ca654e 100644 --- a/.github/workflows/charts-test.yaml +++ b/.github/workflows/charts-test.yaml @@ -34,6 +34,8 @@ jobs: env: RUBYJQ_USE_SYSTEM_LIBRARIES: 1 run: | + sudo apt-get update + sudo apt-get install libjq-dev bundle install - name: Run tests diff --git a/.github/workflows/meta-label-pr-ci-status.yaml b/.github/workflows/meta-label-pr-ci-status.yaml index 3bcf4f2a..cdb8f34a 100644 --- a/.github/workflows/meta-label-pr-ci-status.yaml +++ b/.github/workflows/meta-label-pr-ci-status.yaml @@ -28,13 +28,20 @@ jobs: with: github_token: ${{ steps.generate-token.outputs.token }} workflow: pr-validate.yaml - run_id: ${{ github.event.workflow_run.id }} + name: pr_metadata - 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 + path: ./pr_metadata/pr_number.txt + + - name: Remove workflow artifact + uses: philips-labs/action-delete-artifacts@v1.0.0 + with: + github_token: ${{ steps.generate-token.outputs.token }} + workflow: pr-validate.yaml + name: pr_metadata - name: "Get workflow job status" uses: actions/github-script@v5 diff --git a/.github/workflows/pr-get-metadata.yaml b/.github/workflows/pr-get-metadata.yaml index 75dacaea..9176654a 100644 --- a/.github/workflows/pr-get-metadata.yaml +++ b/.github/workflows/pr-get-metadata.yaml @@ -40,7 +40,7 @@ jobs: - name: Store pr data in artifact uses: actions/upload-artifact@v2 with: - name: pr_number + name: pr_metadata path: ./pr_number.txt pr-changes: diff --git a/.github/workflows/schedule-sync-labels.yaml b/.github/workflows/schedule-sync-labels.yaml new file mode 100644 index 00000000..014499f3 --- /dev/null +++ b/.github/workflows/schedule-sync-labels.yaml @@ -0,0 +1,31 @@ +--- +name: "Schedule: Sync labels" + +on: # yamllint disable-line rule:truthy + workflow_dispatch: + schedule: + - cron: "0 * * * *" + +jobs: + labels: + name: Sync Labels + runs-on: ubuntu-latest + steps: + - 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.generate-token.outputs.token }} + + - name: Sync Labels + uses: EndBug/label-sync@v2 + with: + config-file: .github/labels.yaml + token: "${{ steps.generate-token.outputs.token }}" + delete-other-labels: true