From b27615493d5c874e0c25fbfbfa2ee6fc31e8aa2c Mon Sep 17 00:00:00 2001 From: Nicolas Lamirault Date: Tue, 9 Apr 2024 08:59:07 +0200 Subject: [PATCH] feat(project): change Github Action for projects Signed-off-by: Nicolas Lamirault --- .github/workflows/projects-issues.yml | 163 ++++++++++--------- .github/workflows/projects-pull-requests.yml | 163 ++++++++++--------- 2 files changed, 176 insertions(+), 150 deletions(-) diff --git a/.github/workflows/projects-issues.yml b/.github/workflows/projects-issues.yml index 341761fa33..23e8341e55 100644 --- a/.github/workflows/projects-issues.yml +++ b/.github/workflows/projects-issues.yml @@ -24,8 +24,8 @@ on: # yamllint disable-line rule:truthy - labeled jobs: - cloud-aws: - name: Add issue to Project AWS + issues: + name: Add issue to Project runs-on: ubuntu-latest steps: - name: Monitor Actions @@ -34,82 +34,95 @@ jobs: config: ${{ vars.PERMISSIONS_CONFIG }} - uses: actions/add-to-project@v0.6.0 with: - project-url: https://github.com/orgs/portefaix/projects/3 + project-url: https://github.com/orgs/portefaix/projects/6 github-token: ${{ secrets.ACTIONS_PAT }} - labeled: cloud/aws - label-operator: OR - cloud-azure: - name: Add issue to Project Azure - runs-on: ubuntu-latest - steps: - - name: Monitor Actions - uses: GitHubSecurityLab/actions-permissions/monitor@v1 - with: - config: ${{ vars.PERMISSIONS_CONFIG }} - - uses: actions/add-to-project@v0.6.0 - with: - project-url: https://github.com/orgs/portefaix/projects/5 - github-token: ${{ secrets.ACTIONS_PAT }} - labeled: cloud/azure - label-operator: OR + # cloud-aws: + # name: Add issue to Project AWS + # runs-on: ubuntu-latest + # steps: + # - name: Monitor Actions + # uses: GitHubSecurityLab/actions-permissions/monitor@v1 + # with: + # config: ${{ vars.PERMISSIONS_CONFIG }} + # - uses: actions/add-to-project@v0.6.0 + # with: + # project-url: https://github.com/orgs/portefaix/projects/3 + # github-token: ${{ secrets.ACTIONS_PAT }} + # labeled: cloud/aws + # label-operator: OR - cloud-gcp: - name: Add issue to Project GCP - runs-on: ubuntu-latest - steps: - - name: Monitor Actions - uses: GitHubSecurityLab/actions-permissions/monitor@v1 - with: - config: ${{ vars.PERMISSIONS_CONFIG }} - - uses: actions/add-to-project@v0.6.0 - with: - project-url: https://github.com/orgs/portefaix/projects/4 - github-token: ${{ secrets.ACTIONS_PAT }} - labeled: cloud/gcp - label-operator: OR + # cloud-azure: + # name: Add issue to Project Azure + # runs-on: ubuntu-latest + # steps: + # - name: Monitor Actions + # uses: GitHubSecurityLab/actions-permissions/monitor@v1 + # with: + # config: ${{ vars.PERMISSIONS_CONFIG }} + # - uses: actions/add-to-project@v0.6.0 + # with: + # project-url: https://github.com/orgs/portefaix/projects/5 + # github-token: ${{ secrets.ACTIONS_PAT }} + # labeled: cloud/azure + # label-operator: OR - cloud-homelab: - name: Add issue to Project Homelab - runs-on: ubuntu-latest - steps: - - name: Monitor Actions - uses: GitHubSecurityLab/actions-permissions/monitor@v1 - with: - config: ${{ vars.PERMISSIONS_CONFIG }} - - uses: actions/add-to-project@v0.6.0 - with: - project-url: https://github.com/orgs/portefaix/projects/6 - github-token: ${{ secrets.ACTIONS_PAT }} - labeled: cloud/homelab - label-operator: OR + # cloud-gcp: + # name: Add issue to Project GCP + # runs-on: ubuntu-latest + # steps: + # - name: Monitor Actions + # uses: GitHubSecurityLab/actions-permissions/monitor@v1 + # with: + # config: ${{ vars.PERMISSIONS_CONFIG }} + # - uses: actions/add-to-project@v0.6.0 + # with: + # project-url: https://github.com/orgs/portefaix/projects/4 + # github-token: ${{ secrets.ACTIONS_PAT }} + # labeled: cloud/gcp + # label-operator: OR - kubernetes: - name: Add issue to Project Kubernetes - runs-on: ubuntu-latest - steps: - - name: Monitor Actions - uses: GitHubSecurityLab/actions-permissions/monitor@v1 - with: - config: ${{ vars.PERMISSIONS_CONFIG }} - - uses: actions/add-to-project@v0.6.0 - with: - project-url: https://github.com/orgs/portefaix/projects/14 - github-token: ${{ secrets.ACTIONS_PAT }} - labeled: area/kubernetes - label-operator: OR + # cloud-homelab: + # name: Add issue to Project Homelab + # runs-on: ubuntu-latest + # steps: + # - name: Monitor Actions + # uses: GitHubSecurityLab/actions-permissions/monitor@v1 + # with: + # config: ${{ vars.PERMISSIONS_CONFIG }} + # - uses: actions/add-to-project@v0.6.0 + # with: + # project-url: https://github.com/orgs/portefaix/projects/6 + # github-token: ${{ secrets.ACTIONS_PAT }} + # labeled: cloud/homelab + # label-operator: OR - terraform: - name: Add issue to Project Terraform - runs-on: ubuntu-latest - steps: - - name: Monitor Actions - uses: GitHubSecurityLab/actions-permissions/monitor@v1 - with: - config: ${{ vars.PERMISSIONS_CONFIG }} - - uses: actions/add-to-project@v0.6.0 - with: - project-url: https://github.com/orgs/portefaix/projects/15 - github-token: ${{ secrets.ACTIONS_PAT }} - labeled: area/terraform - label-operator: OR + # kubernetes: + # name: Add issue to Project Kubernetes + # runs-on: ubuntu-latest + # steps: + # - name: Monitor Actions + # uses: GitHubSecurityLab/actions-permissions/monitor@v1 + # with: + # config: ${{ vars.PERMISSIONS_CONFIG }} + # - uses: actions/add-to-project@v0.6.0 + # with: + # project-url: https://github.com/orgs/portefaix/projects/14 + # github-token: ${{ secrets.ACTIONS_PAT }} + # labeled: area/kubernetes + # label-operator: OR + + # terraform: + # name: Add issue to Project Terraform + # runs-on: ubuntu-latest + # steps: + # - name: Monitor Actions + # uses: GitHubSecurityLab/actions-permissions/monitor@v1 + # with: + # config: ${{ vars.PERMISSIONS_CONFIG }} + # - uses: actions/add-to-project@v0.6.0 + # with: + # project-url: https://github.com/orgs/portefaix/projects/15 + # github-token: ${{ secrets.ACTIONS_PAT }} + # labeled: area/terraform + # label-operator: OR diff --git a/.github/workflows/projects-pull-requests.yml b/.github/workflows/projects-pull-requests.yml index 6f08550afe..33b55d1689 100644 --- a/.github/workflows/projects-pull-requests.yml +++ b/.github/workflows/projects-pull-requests.yml @@ -24,8 +24,8 @@ on: # yamllint disable-line rule:truthy - labeled jobs: - cloud-aws: - name: Add PR to Project AWS + pull_requests: + name: Add PR to Project runs-on: ubuntu-latest steps: - name: Monitor Actions @@ -34,82 +34,95 @@ jobs: config: ${{ vars.PERMISSIONS_CONFIG }} - uses: actions/add-to-project@v0.6.0 with: - project-url: https://github.com/orgs/portefaix/projects/3 + project-url: https://github.com/orgs/portefaix/projects/6 github-token: ${{ secrets.ACTIONS_PAT }} - labeled: cloud/aws, status/review_needed - label-operator: AND - cloud-azure: - name: Add PR to Project Azure - runs-on: ubuntu-latest - steps: - - name: Monitor Actions - uses: GitHubSecurityLab/actions-permissions/monitor@v1 - with: - config: ${{ vars.PERMISSIONS_CONFIG }} - - uses: actions/add-to-project@v0.6.0 - with: - project-url: https://github.com/orgs/portefaix/projects/5 - github-token: ${{ secrets.ACTIONS_PAT }} - labeled: cloud/azure, status/review_needed - label-operator: AND + # cloud-aws: + # name: Add PR to Project AWS + # runs-on: ubuntu-latest + # steps: + # - name: Monitor Actions + # uses: GitHubSecurityLab/actions-permissions/monitor@v1 + # with: + # config: ${{ vars.PERMISSIONS_CONFIG }} + # - uses: actions/add-to-project@v0.6.0 + # with: + # project-url: https://github.com/orgs/portefaix/projects/3 + # github-token: ${{ secrets.ACTIONS_PAT }} + # labeled: cloud/aws, status/review_needed + # label-operator: AND - cloud-gcp: - name: Add PR to Project GCP - runs-on: ubuntu-latest - steps: - - name: Monitor Actions - uses: GitHubSecurityLab/actions-permissions/monitor@v1 - with: - config: ${{ vars.PERMISSIONS_CONFIG }} - - uses: actions/add-to-project@v0.6.0 - with: - project-url: https://github.com/orgs/portefaix/projects/4 - github-token: ${{ secrets.ACTIONS_PAT }} - labeled: cloud/gcp, status/review_needed - label-operator: AND + # cloud-azure: + # name: Add PR to Project Azure + # runs-on: ubuntu-latest + # steps: + # - name: Monitor Actions + # uses: GitHubSecurityLab/actions-permissions/monitor@v1 + # with: + # config: ${{ vars.PERMISSIONS_CONFIG }} + # - uses: actions/add-to-project@v0.6.0 + # with: + # project-url: https://github.com/orgs/portefaix/projects/5 + # github-token: ${{ secrets.ACTIONS_PAT }} + # labeled: cloud/azure, status/review_needed + # label-operator: AND - cloud-homelab: - name: Add PR to Project Homelab - runs-on: ubuntu-latest - steps: - - name: Monitor Actions - uses: GitHubSecurityLab/actions-permissions/monitor@v1 - with: - config: ${{ vars.PERMISSIONS_CONFIG }} - - uses: actions/add-to-project@v0.6.0 - with: - project-url: https://github.com/orgs/portefaix/projects/6 - github-token: ${{ secrets.ACTIONS_PAT }} - labeled: cloud/homelab, status/review_needed - label-operator: AND + # cloud-gcp: + # name: Add PR to Project GCP + # runs-on: ubuntu-latest + # steps: + # - name: Monitor Actions + # uses: GitHubSecurityLab/actions-permissions/monitor@v1 + # with: + # config: ${{ vars.PERMISSIONS_CONFIG }} + # - uses: actions/add-to-project@v0.6.0 + # with: + # project-url: https://github.com/orgs/portefaix/projects/4 + # github-token: ${{ secrets.ACTIONS_PAT }} + # labeled: cloud/gcp, status/review_needed + # label-operator: AND - kubernetes: - name: Add PR to Project Kubernetes - runs-on: ubuntu-latest - steps: - - name: Monitor Actions - uses: GitHubSecurityLab/actions-permissions/monitor@v1 - with: - config: ${{ vars.PERMISSIONS_CONFIG }} - - uses: actions/add-to-project@v0.6.0 - with: - project-url: https://github.com/orgs/portefaix/projects/14 - github-token: ${{ secrets.ACTIONS_PAT }} - labeled: area/kubernetes, status/review_needed - label-operator: AND + # cloud-homelab: + # name: Add PR to Project Homelab + # runs-on: ubuntu-latest + # steps: + # - name: Monitor Actions + # uses: GitHubSecurityLab/actions-permissions/monitor@v1 + # with: + # config: ${{ vars.PERMISSIONS_CONFIG }} + # - uses: actions/add-to-project@v0.6.0 + # with: + # project-url: https://github.com/orgs/portefaix/projects/6 + # github-token: ${{ secrets.ACTIONS_PAT }} + # labeled: cloud/homelab, status/review_needed + # label-operator: AND - terraform: - name: Add PR to Project Terraform - runs-on: ubuntu-latest - steps: - - name: Monitor Actions - uses: GitHubSecurityLab/actions-permissions/monitor@v1 - with: - config: ${{ vars.PERMISSIONS_CONFIG }} - - uses: actions/add-to-project@v0.6.0 - with: - project-url: https://github.com/orgs/portefaix/projects/15 - github-token: ${{ secrets.ACTIONS_PAT }} - labeled: area/terraform, status/review_needed - label-operator: AND + # kubernetes: + # name: Add PR to Project Kubernetes + # runs-on: ubuntu-latest + # steps: + # - name: Monitor Actions + # uses: GitHubSecurityLab/actions-permissions/monitor@v1 + # with: + # config: ${{ vars.PERMISSIONS_CONFIG }} + # - uses: actions/add-to-project@v0.6.0 + # with: + # project-url: https://github.com/orgs/portefaix/projects/14 + # github-token: ${{ secrets.ACTIONS_PAT }} + # labeled: area/kubernetes, status/review_needed + # label-operator: AND + + # terraform: + # name: Add PR to Project Terraform + # runs-on: ubuntu-latest + # steps: + # - name: Monitor Actions + # uses: GitHubSecurityLab/actions-permissions/monitor@v1 + # with: + # config: ${{ vars.PERMISSIONS_CONFIG }} + # - uses: actions/add-to-project@v0.6.0 + # with: + # project-url: https://github.com/orgs/portefaix/projects/15 + # github-token: ${{ secrets.ACTIONS_PAT }} + # labeled: area/terraform, status/review_needed + # label-operator: AND