Skip to content

Commit

Permalink
Merge pull request #4 from alexanderadam/fix/update_github_action
Browse files Browse the repository at this point in the history
update GitHub action to use PAT
  • Loading branch information
alexanderadam authored Aug 18, 2024
2 parents d62572a + 800d056 commit 370a57f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/update_metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Install dependencies
run: yarn install

# https://github.com/AdguardTeam/AGLint?tab=readme-ov-file#introduction
# https://github.com/AdguardTeam/AGLint?tab=readme-ov-file#introduction
- name: Run linting
run: yarn aglint alexanderadam.txt

Expand All @@ -29,9 +29,11 @@ jobs:
sed -i 's/! Last modified: .*/! Last modified: $(date +%Y-%m-%d)/' alexanderadam.txt
- name: Commit and push if changed
env:
ACTIONS_PAT: ${{ secrets.ACTIONS_PAT }}
run: |
git config --global user.email "action@github.com"
git config --global user.name "GitHub Action"
git add alexanderadam.txt
git commit -m "Update metadata" || exit 0 # Exit gracefully if no changes
git push
git push https://x-access-token:${{ secrets.ACTIONS_PAT }}@github.com/alexanderadam/adblock_list.git

0 comments on commit 370a57f

Please sign in to comment.