Skip to content

Commit

Permalink
[action] Update github actions on trigger and label. (sonic-net#13542)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
liushilongbuaa authored Jan 30, 2023
1 parent b59f388 commit cabaebb
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/automerge_scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:

jobs:
automerge_scan:
if: github.repository_owner == 'sonic-net'
runs-on: ubuntu-latest
steps:
- name: Debug
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:

jobs:
analyze:
if: github.repository_owner == 'sonic-net'
name: Analyze
runs-on: ubuntu-latest
permissions:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ on:

jobs:
label:
if: github.repository_owner == 'sonic-net'
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr_cherrypick_poststep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
1 change: 1 addition & 0 deletions .github/workflows/semgrep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:

jobs:
semgrep:
if: github.repository_owner == 'sonic-net'
name: Semgrep
runs-on: ubuntu-latest
container:
Expand Down

0 comments on commit cabaebb

Please sign in to comment.