Skip to content

Commit f5068cc

Browse files
[release-v0.1] update release.yml (#8)
* update release.yml Signed-off-by: Bryce Palmer <bpalmer@redhat.com> * set image tag only when not set Signed-off-by: Bryce Palmer <bpalmer@redhat.com> * no longer set IMAGE_TAG as part of release target Signed-off-by: Bryce Palmer <bpalmer@redhat.com> * update makefile to set release env vars if not already set Signed-off-by: Bryce Palmer <bpalmer@redhat.com> --------- Signed-off-by: Bryce Palmer <bpalmer@redhat.com> Co-authored-by: Bryce Palmer <bpalmer@redhat.com>
1 parent d8db898 commit f5068cc

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,16 @@ jobs:
4040

4141
- name: Set the release related variables
4242
run: |
43-
if [[ "${GITHUB_REF}" == "refs/tags/*" ]]; then
43+
if [[ $GITHUB_REF == refs/tags/* ]]; then
4444
# Release tags.
4545
echo IMAGE_TAG="${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
4646
echo GORELEASER_ARGS="--clean --timeout=120m" >> $GITHUB_ENV
4747
echo ENABLE_RELEASE_PIPELINE=true >> $GITHUB_ENV
48-
elif [[ "${GITHUB_REF}" == "refs/heads/*" ]]; then
48+
elif [[ $GITHUB_REF == refs/heads/* ]]; then
4949
# Branch build.
5050
echo IMAGE_TAG="$(echo "${GITHUB_REF#refs/heads/}" | sed -r 's|/+|-|g')" >> $GITHUB_ENV
5151
echo GORELEASER_ARGS="--clean --skip-validate --timeout=120m" >> $GITHUB_ENV
52-
elif [[ "${GITHUB_REF}" == "refs/pull/*" ]]; then
52+
elif [[ $GITHUB_REF == refs/pull/* ]]; then
5353
# PR build.
5454
echo IMAGE_TAG="pr-$(echo "${GITHUB_REF}" | sed -E 's|refs/pull/([^/]+)/?.*|\1|')" >> $GITHUB_ENV
5555
else

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ export GO111MODULE = on
3333
export CGO_ENABLED = 0
3434
export PATH := $(PWD)/$(BUILD_DIR):$(PWD)/$(TOOLS_DIR):$(PATH)
3535

36-
export IMAGE_REPO = quay.io/operator-framework/ansible-operator-plugins
37-
export IMAGE_TAG = dev
36+
export IMAGE_REPO ?= quay.io/operator-framework/ansible-operator-plugins
37+
export IMAGE_TAG ?= dev
3838

3939
##@ Development
4040

@@ -176,7 +176,6 @@ goreleaser: $(LOCALBIN) ## Build a local copy of goreleaser
176176

177177
export ENABLE_RELEASE_PIPELINE ?= false
178178
export GORELEASER_ARGS ?= --snapshot --clean --timeout=120m
179-
release: IMAGE_TAG = $(GIT_VERSION)
180179
release: goreleaser ## Runs goreleaser. By default, this will run only as a snapshot and will not publish any artifacts unless it is run with different arguments. To override the arguments, run with "GORELEASER_ARGS=...". When run as a github action from a tag, this target will publish a full release.
181180
$(GORELEASER) $(GORELEASER_ARGS)
182181

0 commit comments

Comments
 (0)