Skip to content

Commit

Permalink
fix workflow folder not found
Browse files Browse the repository at this point in the history
deploy
  • Loading branch information
trueberryless committed Nov 18, 2024
1 parent 779f6a1 commit 6ecb851
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions .github/workflows/sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,35 +81,35 @@ jobs:
# Sync specified workflow files
for file in $files; do
src_file="workflow-files/$file"
dest_file=".github/workflows/$file"
if [ -f "$src_file" ]; then
echo "Updating file $file..."
mkdir -p "$(dirname "$dest_file")"
cp "$src_file" "$dest_file"
else
echo "Warning: File $file not found in /workflow-files."
fi
src_file="../workflow-files/$file"
dest_file=".github/workflows/$file"
if [ -f "$src_file" ]; then
echo "Updating file $file..."
mkdir -p "$(dirname "$dest_file")"
cp "$src_file" "$dest_file"
else
echo "Warning: File $file not found in /workflow-files."
fi
done
# Commit and push changes if any
echo "Checking for changes..."
git add .github/workflows/
if git diff --cached --quiet; then
echo "No changes detected for $repo_name."
echo "No changes detected for $repo_name."
else
echo "Committing and pushing changes for $repo_name..."
git commit -m "Update GitHub workflow files"
git push --force origin "$branch_name"
# Create a pull request
echo "Creating pull request for $repo_name..."
gh pr create \
--base main \
--head "$branch_name" \
--title "Sync workflow files" \
--body "This PR syncs the specified GitHub workflow files from the central repository."
echo "Committing and pushing changes for $repo_name..."
git commit -m "Update GitHub workflow files"
git push --force origin "$branch_name"
# Create a pull request
echo "Creating pull request for $repo_name..."
gh pr create \
--base main \
--head "$branch_name" \
--title "Sync workflow files" \
--body "This PR syncs the specified GitHub workflow files from the central repository."
fi
# Cleanup
Expand Down

0 comments on commit 6ecb851

Please sign in to comment.