diff --git a/.github/labeler.yaml b/.github/labeler.yaml index 8d3ced067..9f9d69547 100644 --- a/.github/labeler.yaml +++ b/.github/labeler.yaml @@ -1,16 +1,25 @@ --- area/code: - - "controllers/**/*" - - "pkg/**/*" + - changed-files: + - any-glob-to-any-file: "controllers/**/*" + - any-glob-to-any-file: "pkg/**/*" area/api: - - "api/**/*" - - "config/crd/**/*" + - changed-files: + - any-glob-to-any-file: "api/**/*" + - any-glob-to-any-file: "config/crd/**/*" area/github: - - ".github/**/*" + - changed-files: + - any-glob-to-any-file: ".github/**/*" area/hack: - - "hack/**/*" - - "Makefile" + - changed-files: + - any-glob-to-any-file: "hack/**/*" + - any-glob-to-any-file: "Makefile" area/test: - - "test/**/*" + - changed-files: + - any-glob-to-any-file: "test/**/*" area/templates: - - "templates/**/*" + - changed-files: + - any-glob-to-any-file: "templates/**/*" +Container: + - changed-files: + - any-glob-to-any-file: '**' diff --git a/.github/labels.yaml b/.github/labels.yaml index 3f5706ff0..5b2352511 100644 --- a/.github/labels.yaml +++ b/.github/labels.yaml @@ -78,3 +78,7 @@ color: "7B55D7" - name: question color: "cc317c" +- name: Container + color: "0dce67" + description: >- + Container Infra and Tooling. diff --git a/.github/renovate.json5 b/.github/renovate.json5 index dcd6b6bec..ee9ee6a4d 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -44,4 +44,5 @@ separateMinorPatch: true, enabledManagers: ["dockerfile", "gomod", "github-actions", "regex"], recreateClosed: true, + labels: ["Container"] } diff --git a/.github/workflows/issues.yaml b/.github/workflows/issues.yaml new file mode 100644 index 000000000..2386e5fcf --- /dev/null +++ b/.github/workflows/issues.yaml @@ -0,0 +1,29 @@ +name: Label issues And add to projects +on: + issues: + types: + - reopened + - opened +jobs: + label_issues: + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - run: gh issue edit "$NUMBER" --add-label "$LABELS" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} + NUMBER: ${{ github.event.issue.number }} + LABELS: Container + + add-to-project: + name: Add pull request to project + runs-on: ubuntu-latest + steps: + - uses: actions/add-to-project@v0.5.0 + with: + project-url: https://github.com/orgs/SovereignCloudStack/projects/6 + github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} + labeled: Container + label-operator: AND diff --git a/.github/workflows/pr-verify.yml b/.github/workflows/pr-verify.yml index 0e9ac3c11..2b08ed9a6 100644 --- a/.github/workflows/pr-verify.yml +++ b/.github/workflows/pr-verify.yml @@ -22,3 +22,22 @@ jobs: - name: Verify Shellcheck run: make verify-shellcheck + + - name: Generate Token + uses: actions/create-github-app-token@e8e39f73bb84fdf315a015fa3104f314c0a258b4 # v1 + id: generate-token + with: + app-id: ${{ secrets.SCS_APP_ID }} + private-key: ${{ secrets.SCS_APP_PRIVATE_KEY }} + + - name: Generate Labels + uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5 + with: + configuration-path: .github/labeler.yaml + repo-token: ${{ steps.generate-token.outputs.token }} + + - name: Sync Labels + uses: EndBug/label-sync@52074158190acb45f3077f9099fea818aa43f97a # v2 + with: + config-file: .github/labels.yaml + token: ${{ steps.generate-token.outputs.token }}