Skip to content

Commit

Permalink
update script to bypass gitignore and add file to repo on branch
Browse files Browse the repository at this point in the history
  • Loading branch information
n2020h committed Feb 27, 2024
1 parent a81859d commit e51f2c5
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions .github/workflows/issues-to-csv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,23 @@ jobs:
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/issues?state=all&per_page=100" | \
jq -r '.[] | select(.pull_request == null) | [.number, .title, (.labels | map(.name) | join(","))] | @csv' >> issues.csv
#force add file to repo, commit and push
- name: Commit and push
run: |
git config user.name "Automated"
git config user.email "actions@users.noreply.github.com"
git add -f issues.csv
timestamp=$(date -u)
git commit -m "Latest data: ${timestamp}" || exit 0
git push origin HEAD:refs/heads/n2020h-issues-to-csv
# - name: Commit CSV to Repository
# uses: stefanzweifel/git-auto-commit-action@v4
# # Upload CSV as artifact
# - name: Upload CSV as artifact
# uses: actions/upload-artifact@v2
# with:
# commit_message: "Update issues CSV"
# file_pattern: issues.csv
# branch: main

# Upload CSV as artifact
- name: Upload CSV as artifact
uses: actions/upload-artifact@v2
with:
name: issues-csv
path: issues.csv
# name: issues-csv
# path: issues.csv


# name: issues-csv
Expand Down

0 comments on commit e51f2c5

Please sign in to comment.