Skip to content

Commit

Permalink
cmd/konflux: update-sources enhancements and update-sources-branches …
Browse files Browse the repository at this point in the history
…fixes

Signed-off-by: Vincent Demeester <[email protected]>
  • Loading branch information
vdemeester committed Sep 18, 2024
1 parent 41210a6 commit 3e0ef21
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- id: set-matrix
run: |
SUPPORTED_BRANCHES=$(git ls-remote --heads https://github.com/tektoncd/operator 'release-*' | awk '{ print $2 }' | cut -d/ -f3- | jq -cRs 'split("\n")[:-1]')
SUPPORTED_BRANCHES=$(git ls-remote --heads https://github.com/{{.Repository}} 'release-*' | awk '{ print $2 }' | cut -d/ -f3- | jq -cRs 'split("\n")[:-1]')
echo "Supported Branches: ${SUPPORTED_BRANCHES}"
echo "branches=${SUPPORTED_BRANCHES}" >> $GITHUB_OUTPUT
outputs:
Expand Down
4 changes: 3 additions & 1 deletion cmd/konflux/templates/github/workflows/update-sources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ jobs:
git config user.name github-actions
git config user.email [email protected]
git checkout -b actions/update/sources-main
git --git-dir=upstream diff --stat HEAD..$(cat head) > /tmp/diff.txt
git --git-dir=upstream rev-parse HEAD > head
rm -rf upstream/.git
git add upstream
git commit -m "[bot] Update {{.Repository}}"
git commit -m "[{{"${{matrix.branch}}"}}/bot] Update {{.Repository}}\n$(cat /tmp/diff.txt)"
git push -f origin actions/update/sources-main
- name: Create pull request
Expand Down

0 comments on commit 3e0ef21

Please sign in to comment.