mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2025-12-13 21:21:44 +00:00
ci: remove action-add-labels (#368)
* ci: remove action-add-labels * ci: use gh cli * ci: use pull_request_target * ci: add ref --------- Signed-off-by: Yi-Ya Chen <yiya.chen@suse.com>
This commit is contained in:
parent
7fb6d44208
commit
03f54643fd
15
.github/workflows/backport-label.yaml
vendored
15
.github/workflows/backport-label.yaml
vendored
@ -1,7 +1,7 @@
|
|||||||
name: "[PR Management] Add Backport Label"
|
name: "[PR Management] Add Backport Label"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request_target:
|
||||||
types: [opened, reopened]
|
types: [opened, reopened]
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
@ -14,6 +14,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ github.base_ref }}
|
||||||
|
|
||||||
- name: Fetch release branches and PR labels
|
- name: Fetch release branches and PR labels
|
||||||
id: fetch_info
|
id: fetch_info
|
||||||
@ -52,7 +54,10 @@ jobs:
|
|||||||
|
|
||||||
- name: Add backport label if needed
|
- name: Add backport label if needed
|
||||||
if: steps.fetch_info.outputs.should_label == 'true' && !contains(steps.fetch_info.outputs.pr_labels, steps.fetch_info.outputs.backport_label)
|
if: steps.fetch_info.outputs.should_label == 'true' && !contains(steps.fetch_info.outputs.pr_labels, steps.fetch_info.outputs.backport_label)
|
||||||
uses: actions-ecosystem/action-add-labels@v1
|
env:
|
||||||
with:
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
run: |
|
||||||
labels: ${{ steps.fetch_info.outputs.backport_label }}
|
echo "Adding label: ${{ steps.fetch_info.outputs.backport_label }}"
|
||||||
|
gh pr edit ${{ github.event.pull_request.number }} \
|
||||||
|
--repo ${{ github.repository }} \
|
||||||
|
--add-label "${{ steps.fetch_info.outputs.backport_label }}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user