fix url parsing, add path filter

Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
This commit is contained in:
ahuston-0 2025-05-26 13:21:30 -04:00
parent 563c1df3bb
commit e0442bd12f
No known key found for this signature in database
GPG Key ID: 47940175096C1330

View File

@ -4,10 +4,13 @@ on:
workflow_dispatch:
schedule:
- cron: "00 12 * * *"
push:
paths:
- '.github/workflows'
jobs:
update_lockfile:
runs-on: ubuntu-latest
#if: github.ref == 'refs/heads/main' # ensure workflow_dispatch only runs on main
if: github.ref == 'refs/heads/main' # ensure workflow_dispatch only runs on main
steps:
- name: Checkout repository
uses: actions/checkout@v4
@ -22,13 +25,14 @@ jobs:
[[ -z "$url" ]] && break
final_url=$url
done
echo "DETERMINATE_URL=$(echo $final_url)" >> $GITHUB_ENV
echo "DETERMINATE_URL=$(echo '$final_url')" | tee -a $GITHUB_ENV
determinate_version=$(echo $final_url | sed -E -e 's/.*(v[0-9.]+).*/\1/g')
echo "DETERMINATE_VESION=$(echo $determinate_version)" >> $GITHUB_ENV
echo "DETERMINATE_VESION=$(echo '$determinate_version')" | tee -a $GITHUB_ENV
binary_name=$(echo $final_url | sed -E -e 's/.*\/(.*)/\1/g')
echo "DETERMINATE_BINARY=$(echo $binary_name)" >> $GITHUB_ENV
echo "DETERMINATE_BINARY=$(echo '$binary_name')" | tee -a $GITHUB_ENV
- name: Download binary
run: |