-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.github: Move PRChanged,PRChangedPriv,PRCPCheck,PRReCheck,PRMerge logic.
Moved to asterisk-ci-actions reusable workflows.
- Loading branch information
Showing
7 changed files
with
64 additions
and
447 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: PRCPCheck | ||
run-name: "PR ${{ github.event.number }} ${{ github.workflow }} by ${{ github.actor }}" | ||
on: | ||
pull_request_target: | ||
types: [ labeled ] | ||
|
||
jobs: | ||
PRCPCheck: | ||
if: ${{ github.event.label.name == vars.CHERRY_PICK_TEST_LABEL }} | ||
concurrency: | ||
group: cpcheck-${{ github.event.number }} | ||
cancel-in-progress: true | ||
name: "run-cpcheck" | ||
uses: asterisk/asterisk-ci-actions/.github/workflows/AsteriskPRCPCheck.yml@main | ||
secrets: | ||
TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# | ||
# Workflows, like this one, that are triggered by PRs submitted | ||
# from forked repositories are severly limited in what they can do | ||
# for security reasons. For instance, they can't add or remove | ||
# labels or comments even on the PR that triggered them. Since | ||
# we need to both of those things, GitHub recommends creating a | ||
# separate workflow that does those tasks that's triggered when | ||
# this PR workflow starts or finishes. Since that workflow isn't | ||
# being run in the context of a forked repo, it has all the | ||
# privileges needed to add and remove labels and comments. The | ||
# accompanying OnPRStateChangedPriv workflow does just that. | ||
|
||
name: PRChanged | ||
# WARNING! The run name MUST start with "PR <pr_number>". | ||
# The accompanying privleged workflow parses this to find | ||
# the PR number. It's the only reliable way it can get it. | ||
run-name: "PR ${{ github.event.number }} Changed by ${{ github.actor }}" | ||
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
|
||
concurrency: | ||
group: check-${{ github.event.number }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
PRChanged: | ||
name: "run-check" | ||
uses: asterisk/asterisk-ci-actions/.github/workflows/AsteriskPRChanged.yml@main | ||
secrets: | ||
TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,16 @@ | ||
name: MergePR | ||
run-name: "PR ${{ github.event.number }} MergeApproved" | ||
name: PRMerge | ||
run-name: "PR ${{ github.event.number }} ${{ github.workflow }} by ${{ github.actor }}" | ||
on: | ||
pull_request_target: | ||
types: [labeled] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.label.name }}-${{ github.event.number }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
MergePR: | ||
name: MergePR | ||
PRMerge: | ||
if: contains(fromJSON(vars.MERGE_APPROVED_LABELS), github.event.label.name) | ||
uses: asterisk/asterisk-ci-actions/.github/workflows/AsteriskMergePR.yml@main | ||
concurrency: | ||
group: merge-${{ github.event.number }} | ||
cancel-in-progress: true | ||
name: "run-merge" | ||
uses: asterisk/asterisk-ci-actions/.github/workflows/AsteriskPRMerge.yml@main | ||
secrets: | ||
TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
application_id: ${{ secrets.ASTERISK_ORG_ACCESS_APP_ID }} | ||
application_private_key: ${{ secrets.ASTERISK_ORG_ACCESS_APP_PRIV_KEY }} |
Oops, something went wrong.