Skip to content

Commit

Permalink
Update print.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Circuit-Overtime authored Jan 30, 2025
1 parent d4b0865 commit e0da30a
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions .github/workflows/print.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
name: Process Issue
on:
issues:
types: [closed]
# name: Process Issue
# on:
# issues:
# types: [closed]

jobs:
process-issue:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
# jobs:
# process-issue:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repository
# uses: actions/checkout@v3

- name: Append issue body to projects.json
run: |
BODY=$(echo "${{ github.event.issue.body }}" | jq -sR .)
JSON_OBJECT="{\"content\": $BODY}"
# - name: Append issue body to projects.json
# run: |
# BODY=$(echo "${{ github.event.issue.body }}" | jq -sR .)
# JSON_OBJECT="{\"content\": $BODY}"

if [[ -f projects.json ]]; then
echo "$JSON_OBJECT," >> projects.json
else
echo "[$JSON_OBJECT]" > projects.json
fi
# if [[ -f projects.json ]]; then
# echo "$JSON_OBJECT," >> projects.json
# else
# echo "[$JSON_OBJECT]" > projects.json
# fi

- 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 pull origin projects || true
git push origin projects --force
# - 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 pull origin projects || true
# git push origin projects --force

0 comments on commit e0da30a

Please sign in to comment.