Skip to content

update library refs

update library refs #5

name: Update Library References
run-name: update library refs
on:
push:
branches:
- main
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 --amend --no-edit
git push --force origin main