Skip to content

Commit

Permalink
fix: perms
Browse files Browse the repository at this point in the history
  • Loading branch information
maamokun authored Feb 15, 2025
1 parent 6049f52 commit 94ee291
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,23 @@ jobs:
update-blacklist:
runs-on: ubuntu-latest

permissions:
contents: write

steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v3

- name: Download blacklist
run: curl -L -o blacklist.txt https://github.com/fabriziosalmi/blacklists/releases/download/latest/blacklist.txt
- name: Download blacklist
run: curl -L -o blacklist.txt https://github.com/fabriziosalmi/blacklists/releases/download/latest/blacklist.txt

- name: Commit and push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add blacklist.txt
git commit -m 'Update blacklist.txt'
git remote set-url origin https://x-access-token:${{ secrets.ACTIONS_DEPLOY_KEY }}@github.com/mikndotdev/domain-blacklist-api.git
git push
- name: Commit and push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add blacklist.txt
git commit -m 'Update blacklist.txt'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
git push

0 comments on commit 94ee291

Please sign in to comment.