Skip to content

Commit 7c950f6

Browse files
committed
Allow TARGET_BRANCH to be overridden
1 parent 98744fb commit 7c950f6

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

.github/workflows/pattern-sh-ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,5 @@ jobs:
3838

3939
- name: Run pattern.sh script
4040
run: |
41+
export TARGET_BRANCH=main
4142
./scripts/pattern-util.sh make validate-origin

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ TARGET_ORIGIN ?= origin
1818
# This is because we expect to use tokens for repo authentication as opposed to SSH keys
1919
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://%')
2020
# git branch --show-current is also available as of git 2.22, but we will use this for compatibility
21-
TARGET_BRANCH=$(shell git rev-parse --abbrev-ref HEAD)
21+
TARGET_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
2222

2323
UUID_FILE ?= ~/.config/validated-patterns/pattern-uuid
2424
UUID_HELM_OPTS ?=

scripts/pattern-util.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ podman run -it --rm --pull=newer \
8888
-e EXTRA_PLAYBOOK_OPTS \
8989
-e TARGET_ORIGIN \
9090
-e TARGET_SITE \
91+
-e TARGET_BRANCH \
9192
-e NAME \
9293
-e TOKEN_SECRET \
9394
-e TOKEN_NAMESPACE \

0 commit comments

Comments
 (0)