[action] Update github actions on trigger and label. (#13542)

Why I did it
github action will report error on forked repos. It is not by design.
keep 'Approved for xxx branch' label in auto cherry pick workflow.
How I did it
Disable github action on folked repos.
Keep 'approved for xxx' label in auto cherry pick workflow.
How to verify it
Which release bra
This commit is contained in:
Liu Shilong 2023-01-30 16:57:39 +08:00 committed by GitHub
parent b59f3888ff
commit cabaebb4b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 1 deletions

View File

@ -6,6 +6,7 @@ on:
jobs:
automerge_scan:
if: github.repository_owner == 'sonic-net'
runs-on: ubuntu-latest
steps:
- name: Debug

View File

@ -14,6 +14,7 @@ on:
jobs:
analyze:
if: github.repository_owner == 'sonic-net'
name: Analyze
runs-on: ubuntu-latest
permissions:

View File

@ -20,6 +20,7 @@ on:
jobs:
label:
if: github.repository_owner == 'sonic-net'
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@main

View File

@ -46,4 +46,4 @@ jobs:
exit 1
fi
gh pr edit $origin_pr_url --add-label "Included in ${base_ref} Branch"
gh pr edit $origin_pr_url --remove-label "Created PR to ${base_ref} Branch,Approved for ${base_ref} Branch"
gh pr edit $origin_pr_url --remove-label "Created PR to ${base_ref} Branch"

View File

@ -10,6 +10,7 @@ on:
jobs:
semgrep:
if: github.repository_owner == 'sonic-net'
name: Semgrep
runs-on: ubuntu-latest
container: