Skip to content

update library refs

update library refs #2

name: Update Library References
run-name: update library refs
on:
push:
branches:
- main
jobs:
update-hash:
name: Update hash
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 remote set-url origin https://x-access-token:{{ secrets.GH_PAT }}@github.com/Edexaal/scripts.git
git push --force origin main