Update move-to-main-repo.yaml
This commit is contained in:
parent
2518aeb469
commit
f099d01779
24
.github/workflows/move-to-main-repo.yaml
vendored
24
.github/workflows/move-to-main-repo.yaml
vendored
@ -27,6 +27,11 @@ jobs:
|
||||
repositories: |
|
||||
ProxmoxVE
|
||||
ProxmoxVED
|
||||
|
||||
- name: Check GitHub authentication
|
||||
run: gh auth status
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GH_MERGE_PAT }}
|
||||
|
||||
- name: Checkout ProxmoxVED (Source Repo)
|
||||
uses: actions/checkout@v4
|
||||
@ -41,21 +46,18 @@ jobs:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
echo "Filtering Issues with Label MigrationTest"
|
||||
|
||||
raw_output=$(gh issue list --json title,labels)
|
||||
echo "$raw_output"
|
||||
|
||||
filtered_issues=$(echo "$raw_output" | jq -r '.[] | select(.labels[]?.name == "MigrationTest") | .title')
|
||||
if [ -z "$filtered_issues" ]; then
|
||||
echo "No issues found with label 'MigrationTest'."
|
||||
exit 1
|
||||
else
|
||||
echo "Found script names with 'MigrationTest' label:"
|
||||
echo "$filtered_issues"
|
||||
for script_name in $filtered_issues; do
|
||||
echo "Processing: $script_name"
|
||||
script_name_lowercase=$(echo "$script_name" | tr '[:upper:]' '[:lower:]')
|
||||
echo "script_name=$script_name_lowercase" >> $GITHUB_ENV
|
||||
done
|
||||
script_name=$(echo "$filtered_issues" | head -n 1) # Nur das erste Issue nehmen
|
||||
script_name_lowercase=$(echo "$script_name" | tr '[:upper:]' '[:lower:]' | tr -d ' ')
|
||||
echo "Script Name: $script_name_lowercase"
|
||||
echo "script_name=$script_name_lowercase" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: Check if script files exist
|
||||
@ -84,6 +86,12 @@ jobs:
|
||||
git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
|
||||
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com'
|
||||
|
||||
- name: Prepare branch name
|
||||
run: |
|
||||
branch_name="add-script-${script_name//[^a-zA-Z0-9_-]/}"
|
||||
echo "Using branch: $branch_name"
|
||||
echo "branch_name=$branch_name" >> $GITHUB_ENV
|
||||
|
||||
- name: Prepare new branch for PR
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user