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