Skip to content

Commit

Permalink
Update update-portfolio.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
luc-github committed Oct 28, 2024
1 parent ef20caa commit 46fc181
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/update-portfolio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.PAT_TOKEN }}

- name: Set up Python
uses: actions/setup-python@v2
Expand All @@ -29,8 +31,11 @@ jobs:
run: python analyze.py

- name: Commit and push if changed
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
run: |
git config --global user.name 'GitHub Action'
git config --global user.email '[email protected]'
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}
git add -A
git diff --quiet && git diff --staged --quiet || (git commit -m "Update portfolio analysis" && git push)

0 comments on commit 46fc181

Please sign in to comment.