Skip to content

CLOUDP-275620 Fix broken docker build test github action #999

CLOUDP-275620 Fix broken docker build test github action

CLOUDP-275620 Fix broken docker build test github action #999

Workflow file for this run

name: Issue and PRs Labeler
on:
issues:
types: [opened, edited]
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
jobs:
labeler:
name: Add Label to PRs and Issues
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write # Needed by labeler
issues: write # Needed by labeler
steps:
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
with:
config: ${{ vars.PERMISSIONS_CONFIG }}
- name: Checkout repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Add Labels
uses: srvaroa/labeler@bfe288801b8091b6a70e67f3ce7c9e87c88921cf
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
config_path: .github/labeler.yaml
use_local_config: true
slack-notification-doc-team:
needs: labeler
runs-on: ubuntu-latest
permissions:
pull-requests: write # Needed by sticky-pull-request-comment
steps:
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
with:
config: ${{ vars.PERMISSIONS_CONFIG }}
- name: Get PR labels
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OWNER: ${{ github.repository_owner }}
REPO_NAME: ${{ github.event.repository.name }}
PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
run: |
labels=$(gh api repos/"$OWNER"/"$REPO_NAME"/pulls/"$PULL_REQUEST_NUMBER" --jq '.labels.[].name')
echo "Labels: $labels"
if echo "$labels" | grep -q "need-doc-review"; then
echo "review_needed=true" >> "$GITHUB_ENV"
fi
- uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31
id: append_comment
if: env.review_needed == 'true'
with:
header: pr-title-slack-doc
message: "APIx Bot :bowtie:: a message has been sent to Docs Slack channel :rocket:."
- uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0
if: env.review_needed == 'true' && steps.append_comment.outputs.previous_comment_id == ''
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_DOCS }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
with:
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "hey ${{ secrets.SLACK_DOCS_TAG }}, this is APIx Bot :aileafy:, could you please review <${{ github.event.pull_request.html_url }}|PR ${{ github.event.pull_request.number }}> :pretty-please:? thanks a lot!"
}
}
]
}