Skip to content

Commit

Permalink
Update update-projects.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Circuit-Overtime authored Jan 30, 2025
1 parent 215fdf0 commit 72e00dd
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/update-projects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Stash local changes
run: |
git stash
- name: Append issue body to projects.json
run: |
BODY=$(echo "${{ github.event.issue.body }}" | jq -sR .)
Expand All @@ -28,11 +32,18 @@ jobs:
echo "[$JSON_OBJECT]" > projects.json
fi
- name: Pull latest changes from remote
run: |
git pull origin main
- name: Commit and push changes
run: |
git config --global user.name 'GitHub Actions Bot'
git config --global user.email 'actions@github.com'
git add projects.json
git commit -m "Update projects.json with issue body"
git checkout -b projects
git push origin projects --force
git push origin main
- name: Apply stashed changes (if any)
run: |
git stash pop || echo "No stashed changes"

0 comments on commit 72e00dd

Please sign in to comment.