Fixed the workflow to handle missing labels gracefully.

This commit is contained in:
John Doe
2026-03-08 12:53:16 -04:00
parent 999b84e613
commit 062b1dc6c9
2 changed files with 16 additions and 1 deletions
+5 -1
View File
@@ -301,4 +301,8 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh issue comment ${{ steps.list_issues.outputs.issue_nr }} --body "A PR has been created for ${{ steps.list_issues.outputs.script_name }}: community-unscripted/ProxmoxVE#${{ steps.create_pull_request.outputs.pr_number }}"
gh issue edit ${{ steps.list_issues.outputs.issue_nr }} --remove-label "Migration To ProxmoxVE" --add-label "Started Migration To ProxmoxVE"
# Remove the migration label (ignore error if label doesn't exist)
gh issue edit ${{ steps.list_issues.outputs.issue_nr }} --remove-label "Migration To ProxmoxVE" || true
# Add the started label (create it if it doesn't exist)
gh label create "Started Migration To ProxmoxVE" --description "Migration to ProxmoxVE has been started" --color "0E8A16" 2>/dev/null || true
gh issue edit ${{ steps.list_issues.outputs.issue_nr }} --add-label "Started Migration To ProxmoxVE" || true
+11
View File
@@ -167,6 +167,17 @@ assignees: ''
fi
```
### Required Labels
The workflow uses two labels:
| Label | Purpose | Color |
|-------|---------|-------|
| `Migration To ProxmoxVE` | Triggers the workflow | Any color |
| `Started Migration To ProxmoxVE` | Marks migration in progress | Green (#0E8A16) |
**Note**: The `Started Migration To ProxmoxVE` label is automatically created by the workflow if it doesn't exist.
### Triggering the Workflow
After creating the issue: