ci: refine community project action and add qa project action
Signed-off-by: Yang Chiu <yang.chiu@suse.com>
This commit is contained in:
parent
cc043c43d1
commit
22daa08f60
36
.github/workflows/add-to-projects.yaml
vendored
36
.github/workflows/add-to-projects.yaml
vendored
@ -1,36 +0,0 @@
|
||||
name: Add issues to projects
|
||||
|
||||
on:
|
||||
issues:
|
||||
types:
|
||||
- labeled
|
||||
- opened
|
||||
|
||||
jobs:
|
||||
add-to-qa-devops-project:
|
||||
name: Add issue to QA & DevOps project
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/add-to-project@v0.3.0
|
||||
with:
|
||||
project-url: https://github.com/orgs/longhorn/projects/4
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
labeled: kind/test, area/test-infra
|
||||
label-operator: OR
|
||||
|
||||
add-to-community-project:
|
||||
name: Add issue to Community project
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: JamesSingleton/is-organization-member@1.0.0
|
||||
id: is_organization_member
|
||||
if: github.event.action == 'opened'
|
||||
with:
|
||||
organization: longhorn
|
||||
username: ${{ github.event.issue.user.login }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- uses: actions/add-to-project@v0.3.0
|
||||
if: steps.is_organization_member.outputs.result == false
|
||||
with:
|
||||
project-url: https://github.com/orgs/longhorn/projects/5
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
32
.github/workflows/add-to-projects.yml
vendored
Normal file
32
.github/workflows/add-to-projects.yml
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
name: Add-To-Projects
|
||||
on:
|
||||
issues:
|
||||
types: [opened, labeled]
|
||||
jobs:
|
||||
community:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Is Longhorn Member
|
||||
uses: tspascoal/get-user-teams-membership@v1.0.4
|
||||
id: is-longhorn-member
|
||||
with:
|
||||
username: ${{ github.event.issue.user.login }}
|
||||
organization: longhorn
|
||||
GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
|
||||
- name: Add To Community Project
|
||||
if: fromJSON(steps.is-longhorn-member.outputs.teams)[0] == null
|
||||
uses: actions/add-to-project@v0.3.0
|
||||
with:
|
||||
project-url: https://github.com/orgs/longhorn/projects/5
|
||||
github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
|
||||
|
||||
qa:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Add To QA & Devops Project
|
||||
uses: actions/add-to-project@v0.3.0
|
||||
with:
|
||||
project-url: https://github.com/orgs/longhorn/projects/4
|
||||
github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
|
||||
labeled: kind/test, area/test-infra
|
||||
label-operator: OR
|
24
.github/workflows/community-issue.yml
vendored
24
.github/workflows/community-issue.yml
vendored
@ -1,24 +0,0 @@
|
||||
name: Community-Issue
|
||||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
jobs:
|
||||
community:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Is Longhorn Member
|
||||
uses: tspascoal/get-user-teams-membership@v1.0.4
|
||||
id: is-longhorn-member
|
||||
with:
|
||||
username: ${{ github.event.issue.user.login }}
|
||||
organization: longhorn
|
||||
GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
|
||||
- name: Add To Community Project
|
||||
if: fromJSON(steps.is-longhorn-member.outputs.teams)[0] == null
|
||||
uses: leonsteinhaeuser/project-beta-automations@v1.2.1
|
||||
with:
|
||||
gh_token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
|
||||
organization: longhorn
|
||||
project_id: 5
|
||||
resource_node_id: ${{ github.event.issue.node_id }}
|
||||
status_value: New
|
Loading…
Reference in New Issue
Block a user