🔄 synced file(s) with bitnami/support (#53312)
🔄 synced local '.github/workflows/' with remote 'workflows/'
Signed-off-by: bitnami-bot <bitnami-bot@vmware.com>
This commit is contained in:
parent
c4771b38a4
commit
24d6b28b5d
|
|
@ -6,52 +6,14 @@ on:
|
|||
issue_comment:
|
||||
types:
|
||||
- created
|
||||
# Remove all permissions by default
|
||||
permissions: {}
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
issues: write
|
||||
# Avoid concurrency over the same issue
|
||||
concurrency:
|
||||
group: card-movement-${{ github.event.issue.number }}
|
||||
jobs:
|
||||
comments_handler:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
repository-projects: write
|
||||
issues: read
|
||||
pull-requests: read
|
||||
steps:
|
||||
- name: Repo checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
|
||||
- name: Load .env file
|
||||
uses: xom9ikk/dotenv@de1ff27d319507880e6621e4d47424c677d95f68
|
||||
with:
|
||||
path: .github/workflows/
|
||||
- name: Move into Pending
|
||||
uses: peter-evans/create-or-update-project-card@dfa240db6fe287ceb681e45d6728c1af70452c58
|
||||
if: |
|
||||
(github.actor != 'bitnami-bot' || github.event.issue.user.login != 'bitnami-bot' || github.event.issue.pull_request == null) &&
|
||||
contains(fromJson(env.BITNAMI_TEAM), github.actor) &&
|
||||
(!contains(github.event.issue.labels.*.name, 'bitnami'))
|
||||
with:
|
||||
project-name: Support
|
||||
column-name: Pending
|
||||
- name: Move into In Progress
|
||||
uses: peter-evans/create-or-update-project-card@dfa240db6fe287ceb681e45d6728c1af70452c58
|
||||
if: |
|
||||
(github.actor != 'bitnami-bot' || github.event.issue.user.login != 'bitnami-bot' || github.event.issue.pull_request == null) &&
|
||||
(!contains(fromJson(env.BITNAMI_TEAM), github.actor)) &&
|
||||
contains(github.event.issue.labels.*.name, 'in-progress')
|
||||
with:
|
||||
project-name: Support
|
||||
column-name: In progress
|
||||
- name: Move into Triage
|
||||
uses: peter-evans/create-or-update-project-card@dfa240db6fe287ceb681e45d6728c1af70452c58
|
||||
if: |
|
||||
(github.actor != 'bitnami-bot' || github.event.issue.user.login != 'bitnami-bot' || github.event.issue.pull_request == null) &&
|
||||
(!contains(fromJson(env.BITNAMI_TEAM), github.actor)) &&
|
||||
(!contains(github.event.issue.labels.*.name, 'in-progress'))
|
||||
with:
|
||||
project-name: Support
|
||||
column-name: Triage
|
||||
# Needs reasignation of the task
|
||||
token: "${{ secrets.BITNAMI_BOT_TOKEN }}"
|
||||
call-comments-workflow:
|
||||
uses: bitnami/support/.github/workflows/comment-created.yml@main
|
||||
secrets: inherit
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
# Copyright VMware, Inc.
|
||||
# SPDX-License-Identifier: APACHE-2.0
|
||||
|
||||
name: '[Support] Cards migration'
|
||||
on: [ workflow_dispatch ]
|
||||
permissions: {}
|
||||
jobs:
|
||||
call-migration-workflow:
|
||||
uses: bitnami/support/.github/workflows/migrate-reusable.yml@main
|
||||
with:
|
||||
organization: bitnami
|
||||
legacy_project_board_name: Support
|
||||
new_project_number: 4
|
||||
repo: ${{ github.event.repository.name }}
|
||||
secrets:
|
||||
# This token should have access to both projects and at least read:project permissions
|
||||
token: ${{ secrets.MIGRATION_TOKEN }}
|
||||
|
|
@ -9,24 +9,13 @@ on:
|
|||
pull_request_target:
|
||||
types:
|
||||
- closed
|
||||
# Remove all permissions by default. Actions are performed by Bitnami Bot
|
||||
permissions: {}
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
# Avoid concurrency over the same issue
|
||||
concurrency:
|
||||
group: card-movement-${{ github.event_name != 'issues' && github.event.number || github.event.issue.number }}
|
||||
group: card-movement-${{ github.event.repository.id }}-${{ github.event.issue != null && github.event.issue.number || github.event.number }}
|
||||
jobs:
|
||||
send_to_solved:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Send to the Solved column
|
||||
id: send-solved
|
||||
uses: peter-evans/create-or-update-project-card@dfa240db6fe287ceb681e45d6728c1af70452c58
|
||||
# Send to solve only the issues and PRs created by users or the automated PRs with human review required
|
||||
if: |
|
||||
(github.event.issue != null && github.event.issue.user.login != 'bitnami-bot') ||
|
||||
(github.event.issue == null && (github.event.pull_request.user.login != 'bitnami-bot' || contains(github.event.pull_request.labels.*.name, 'review-required')))
|
||||
with:
|
||||
project-name: Support
|
||||
column-name: 'Solved'
|
||||
token: "${{ secrets.BITNAMI_BOT_TOKEN }}"
|
||||
issue-number: ${{ github.event_name != 'issues' && github.event.number || github.event.issue.number }}
|
||||
call-move-closed-workflow:
|
||||
uses: bitnami/support/.github/workflows/item-closed.yml@main
|
||||
secrets: inherit
|
||||
|
|
@ -7,36 +7,12 @@ on:
|
|||
types:
|
||||
- review_requested
|
||||
- synchronize
|
||||
# Remove all permissions by default
|
||||
permissions: {}
|
||||
permissions:
|
||||
contents: read
|
||||
# Avoid concurrency over the same issue
|
||||
concurrency:
|
||||
group: card-movement-${{ github.event.number }}
|
||||
jobs:
|
||||
handler:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
repository-projects: write
|
||||
contents: read
|
||||
pull-requests: read
|
||||
# This job will ignore:
|
||||
# * Events triggered by bitnami-bot (README commits for example).
|
||||
# * Events triggered over automated PRs (They are managed in comments.yml workflow).
|
||||
# * PRs with 'bitnami' label.
|
||||
if: |
|
||||
github.actor != 'bitnami-bot' && github.event.pull_request.user.login != 'bitnami-bot' &&
|
||||
(!contains(github.event.pull_request.labels.*.name, 'bitnami')) && (!contains(github.event.pull_request.labels.*.name, 'triage'))
|
||||
steps:
|
||||
- name: Repo checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
|
||||
- name: Load .env file
|
||||
uses: xom9ikk/dotenv@de1ff27d319507880e6621e4d47424c677d95f68
|
||||
with:
|
||||
path: .github/workflows/
|
||||
- name: Move into In Progress
|
||||
# Move the card only if the actor is not a Bitnami member
|
||||
if: ${{ !contains(fromJson(env.BITNAMI_TEAM), github.actor) }}
|
||||
uses: peter-evans/create-or-update-project-card@dfa240db6fe287ceb681e45d6728c1af70452c58
|
||||
with:
|
||||
project-name: Support
|
||||
column-name: In progress
|
||||
issue-number: ${{ github.event.number }}
|
||||
call-pr-review-workflow:
|
||||
uses: bitnami/support/.github/workflows/pr-review-requested-sync.yml@main
|
||||
secrets: inherit
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
# Copyright VMware, Inc.
|
||||
# SPDX-License-Identifier: APACHE-2.0
|
||||
|
||||
name: '[Support] Review based card movements'
|
||||
on:
|
||||
pull_request_target:
|
||||
types:
|
||||
- labeled
|
||||
issues:
|
||||
types:
|
||||
- labeled
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
issues: write
|
||||
# Avoid concurrency over the same issue
|
||||
concurrency:
|
||||
group: card-movement-${{ github.event.issue != null && github.event.issue.number || github.event.number }}
|
||||
jobs:
|
||||
call-reasign-workflow:
|
||||
uses: bitnami/support/.github/workflows/item-labeled.yml@main
|
||||
secrets: inherit
|
||||
|
|
@ -12,62 +12,14 @@ on:
|
|||
types:
|
||||
- reopened
|
||||
- opened
|
||||
# Remove all permissions by default
|
||||
permissions: {}
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
issues: write
|
||||
# Avoid concurrency over the same issue
|
||||
concurrency:
|
||||
group: card-movement-${{ github.event_name != 'issues' && github.event.number || github.event.issue.number }}
|
||||
group: card-movement-${{ github.event.issue != null && github.event.issue.number || github.event.number }}
|
||||
jobs:
|
||||
# For any opened or reopened issue, should be sent into Triage
|
||||
send_to_board:
|
||||
name: Organize triage
|
||||
runs-on: ubuntu-latest
|
||||
# Please note that projects cards are created/moved with Bitnami Bot
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Repo checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- name: Load .env file
|
||||
uses: xom9ikk/dotenv@de1ff27d319507880e6621e4d47424c677d95f68
|
||||
with:
|
||||
path: .github/workflows/
|
||||
- name: Get author
|
||||
id: get-issue
|
||||
run: |
|
||||
author="${{ github.event.issue != null && github.event.issue.user.login || github.event.pull_request.user.login }}"
|
||||
number="${{ github.event_name != 'issues' && github.event.number || github.event.issue.number }}"
|
||||
type="${{ github.event_name != 'issues' && 'pull_request' || 'issue' }}"
|
||||
echo "author=${author}" >> $GITHUB_OUTPUT
|
||||
echo "number=${number}" >> $GITHUB_OUTPUT
|
||||
echo "type=${type}" >> $GITHUB_OUTPUT
|
||||
- name: Send to the board
|
||||
if: ${{steps.get-issue.outputs.author != 'bitnami-bot' || steps.get-issue.outputs.type != 'pull_request'}}
|
||||
uses: peter-evans/create-or-update-project-card@dfa240db6fe287ceb681e45d6728c1af70452c58
|
||||
with:
|
||||
project-name: Support
|
||||
# If the author comes from Bitnami, send it to Bitnami. Otherwise, all to Triage
|
||||
column-name: ${{ (contains(fromJson(env.BITNAMI_TEAM), steps.get-issue.outputs.author)) && 'From Bitnami' || 'Triage' }}
|
||||
token: "${{ secrets.BITNAMI_BOT_TOKEN }}"
|
||||
issue-number: ${{ steps.get-issue.outputs.number }}
|
||||
labeling:
|
||||
name: Set labels for Automated PRs
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: write
|
||||
if: ${{ github.event_name != 'issues' && github.event.pull_request.user.login == 'bitnami-bot' }}
|
||||
# The project API is not efficient and requires several requests to create the project card. For that reason we decided to create
|
||||
# a card for the automated PRs only when it is needed.
|
||||
steps:
|
||||
- name: From Bitnami labeling
|
||||
uses: fmulero/labeler@f49bf680252fc8ac12cbebb6e0ed8ea19d0712da
|
||||
with:
|
||||
add-labels: 'automated, auto-merge'
|
||||
- name: Verify labeling
|
||||
uses: fmulero/labeler@f49bf680252fc8ac12cbebb6e0ed8ea19d0712da
|
||||
with:
|
||||
# Bitnami bot token is required to trigger CI workflows
|
||||
repo-token: ${{ secrets.BITNAMI_BOT_TOKEN }}
|
||||
add-labels: verify
|
||||
call-triage-workflow:
|
||||
uses: bitnami/support/.github/workflows/item-opened.yml@main
|
||||
secrets: inherit
|
||||
Loading…
Reference in New Issue