Skip to content

Commit

Permalink
Allow TARGET_BRANCH to be overridden
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaldessari committed Feb 10, 2025
1 parent 98744fb commit 7c950f6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/pattern-sh-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ jobs:

- name: Run pattern.sh script
run: |
export TARGET_BRANCH=main
./scripts/pattern-util.sh make validate-origin
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ TARGET_ORIGIN ?= origin
# This is because we expect to use tokens for repo authentication as opposed to SSH keys
TARGET_REPO=$(shell git ls-remote --get-url --symref $(TARGET_ORIGIN) | sed -e 's/.*URL:[[:space:]]*//' -e 's%^git@%%' -e 's%^https://%%' -e 's%:%/%' -e 's%^%https://%')
# git branch --show-current is also available as of git 2.22, but we will use this for compatibility
TARGET_BRANCH=$(shell git rev-parse --abbrev-ref HEAD)
TARGET_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)

UUID_FILE ?= ~/.config/validated-patterns/pattern-uuid
UUID_HELM_OPTS ?=
Expand Down
1 change: 1 addition & 0 deletions scripts/pattern-util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ podman run -it --rm --pull=newer \
-e EXTRA_PLAYBOOK_OPTS \
-e TARGET_ORIGIN \
-e TARGET_SITE \
-e TARGET_BRANCH \
-e NAME \
-e TOKEN_SECRET \
-e TOKEN_NAMESPACE \
Expand Down

0 comments on commit 7c950f6

Please sign in to comment.