Skip to content

Commit 1698acd

Browse files
eoinfennessyclaude
andcommitted
fix(ci): use globs in update-lockfiles workflow for missing konflux lockfile
The workflow failed with "fatal: pathspec did not match" because requirements-lock-konflux.txt was removed from this repo (moved to the downstream fork). Switch git diff, git add, and the PR body to use glob patterns so the workflow handles whichever lockfiles exist. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 503715f commit 1698acd

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/update-lockfiles.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Check for changes
3131
id: changes
3232
run: |
33-
if git diff --quiet distribution/requirements-lock.txt distribution/requirements-lock-konflux.txt; then
33+
if git diff --quiet -- distribution/requirements-lock*.txt; then
3434
echo "changed=false" >> "$GITHUB_OUTPUT"
3535
echo "No lockfile changes detected"
3636
else
@@ -63,7 +63,7 @@ jobs:
6363
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
6464
run: |
6565
git checkout -B "$BRANCH"
66-
git add distribution/requirements-lock.txt distribution/requirements-lock-konflux.txt
66+
git add -- distribution/requirements-lock*.txt
6767
git diff --cached --quiet && { echo "No changes to commit"; exit 0; }
6868
git commit -m "chore: update dependency lockfiles"
6969
git remote set-url origin "https://x-access-token:${RELEASE_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
@@ -76,6 +76,8 @@ jobs:
7676
run: |
7777
PR_URL=$(gh pr list --head "$BRANCH" --state open --json url --jq '.[0].url' 2>/dev/null || echo "")
7878
79+
FILE_LIST=$(git diff-tree --no-commit-id --name-only -r HEAD -- 'distribution/requirements-lock*.txt' | sed "s|.*|- \`&\`|")
80+
7981
BODY=$(cat <<EOF
8082
## Automated lockfile update
8183
@@ -86,8 +88,7 @@ jobs:
8688
This PR regenerates the pinned dependency lockfiles to pick up upstream package changes.
8789
8890
### Updated files
89-
- \`distribution/requirements-lock.txt\`
90-
- \`distribution/requirements-lock-konflux.txt\`
91+
${FILE_LIST}
9192
9293
> This PR was auto-generated by the [update-lockfiles workflow](${WORKFLOW_URL}).
9394
> Review the dependency changes and merge when ready.

0 commit comments

Comments
 (0)