Skip to content

Commit

Permalink
Use env to refer to a consistent lockfile name in automation
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-thm committed Apr 17, 2024
1 parent 8ff20b5 commit 20cf261
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/periodic-update-multitool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
permissions:
id-token: write
contents: read
env:
LOCKFILE: uv/private/uv.lock.json
# disable running on anything but main
if: ${{ github.ref == 'refs/heads/main' }}
steps:
Expand All @@ -31,18 +33,18 @@ jobs:
- name: Find Updates and Render Lockfile
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
run: ./multitool --lockfile uv/private/uv.lock.json update
run: ./multitool --lockfile "$LOCKFILE" update
- name: Commit Changes
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
BRANCH_NAME: "automation/update-multitool-lockfile"
run: |
if [[ -n "$(git diff multitool.lock.json)" ]]
if [[ -n "$(git diff "$LOCKFILE")" ]]
then
git config --local user.name 'Theorem Automation'
git config --local user.email 'thm-automation[bot]@users.noreply.github.com'
git checkout -b "${BRANCH_NAME}"
git add multitool.lock.json
git add "$LOCKFILE"
git commit -m "Update Multitool Versions
Updated with [update-multitool](${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}) by *${GITHUB_ACTOR}*
Expand Down

0 comments on commit 20cf261

Please sign in to comment.