Skip to content

update library refs

update library refs #9

name: Update Library References
run-name: update library refs
on:
push:
branches:
- main
paths-ignore:
- 'f95/auto-open-filter-drawer.user.js'
- 'lc/game-post-only.user.js'
jobs:
update-hash:
name: Update hash
permissions:
contents: write
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Configurations
run: |
git config --global user.name ${{ secrets.USER_NAME }}
git config --global user.email ${{ secrets.EMAIL }}
- name: Update references with new hash
shell: pwsh
run: |
$CommitHash = (git rev-parse HEAD)
Get-Item "./f95/*", "./lc/*" | ForEach-Object -Process {(Get-Content $_) -replace '[a-f0-9]{40}', $CommitHash | Set-Content $_}
git add -A
git commit -m "Fix library references"
git push --force origin main