Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Taior committed Nov 15, 2024
1 parent 6ba1977 commit a7e3427
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
20 changes: 19 additions & 1 deletion .github/workflow_templates/on-pull-request-backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,24 @@ on:
- created

jobs:
conditions:
name: Check conditions
runs-on: ubuntu-latest
outputs:
trigger_by_label: ${{steps.check.outputs.trigger_by_label}}
trigger_by_comment: ${{steps.check.outputs.trigger_by_comment}}
steps:
- name: Check conditions for backport
id: check
uses: {!{ index (ds "actions") "actions/github-script" }!}
with:
script: |
console.log(context);
if (!context.payload.comment.body.startsWith('/')) {
core.notice(`Ignore regular comment.`);
return;
}
detect_pr_by_label:
concurrency: source_pr
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.merged == true && github.event.pull_request.milestone != null && contains(github.event.pull_request.labels.*.name, 'status/backport') }}
Expand Down Expand Up @@ -128,7 +146,7 @@ jobs:
committer: "deckhouse-BOaTswain <[email protected]>"
branch: ${{ env.RELEASE_BRANCH }}
commit: ${{ env.COMMIT_SHA }}
labels: auto,status/backport/success
labels: auto,backported
automerge: true
merge_method: squash
- name: Add success label
Expand Down
20 changes: 19 additions & 1 deletion .github/workflows/on-pull-request-backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,24 @@ on:
- created

jobs:
conditions:
name: Check conditions
runs-on: ubuntu-latest
outputs:
trigger_by_label: ${{steps.check.outputs.trigger_by_label}}
trigger_by_comment: ${{steps.check.outputs.trigger_by_comment}}
steps:
- name: Check conditions for backport
id: check
uses: actions/[email protected]
with:
script: |
console.log(context);
if (!context.payload.comment.body.startsWith('/')) {
core.notice(`Ignore regular comment.`);
return;
}
detect_pr_by_label:
concurrency: source_pr
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.merged == true && github.event.pull_request.milestone != null && contains(github.event.pull_request.labels.*.name, 'status/backport') }}
Expand Down Expand Up @@ -132,7 +150,7 @@ jobs:
committer: "deckhouse-BOaTswain <[email protected]>"
branch: ${{ env.RELEASE_BRANCH }}
commit: ${{ env.COMMIT_SHA }}
labels: auto,status/backport/success
labels: auto,backported
automerge: true
merge_method: squash
- name: Add success label
Expand Down

0 comments on commit a7e3427

Please sign in to comment.