diff --git a/.github/workflows/promote.yml b/.github/workflows/promote.yml index f21bc69672..91b2fde0ec 100644 --- a/.github/workflows/promote.yml +++ b/.github/workflows/promote.yml @@ -33,7 +33,7 @@ jobs: - name: Build collection and publish to galaxy run: | - COLLECTION_NAMESPACE=${{ env.collection_namespace }} make build_collection + COLLECTION_TEMPLATE_VERSION=true COLLECTION_NAMESPACE=${{ env.collection_namespace }} make build_collection ansible-galaxy collection publish \ --token=${{ secrets.GALAXY_TOKEN }} \ awx_collection_build/${{ env.collection_namespace }}-awx-${{ github.event.release.tag_name }}.tar.gz diff --git a/Makefile b/Makefile index 3263edfbca..5f27833005 100644 --- a/Makefile +++ b/Makefile @@ -288,6 +288,7 @@ COLLECTION_TEST_TARGET ?= COLLECTION_PACKAGE ?= awx COLLECTION_NAMESPACE ?= awx COLLECTION_INSTALL = ~/.ansible/collections/ansible_collections/$(COLLECTION_NAMESPACE)/$(COLLECTION_PACKAGE) +COLLECTION_TEMPLATE_VERSION ?= false test_collection: rm -f $(shell ls -d $(VENV_BASE)/awx/lib/python* | head -n 1)/no-global-site-packages.txt @@ -315,7 +316,7 @@ awx_collection_build: $(shell find awx_collection -type f) -e collection_package=$(COLLECTION_PACKAGE) \ -e collection_namespace=$(COLLECTION_NAMESPACE) \ -e collection_version=$(COLLECTION_VERSION) \ - -e '{"awx_template_version":false}' + -e '{"awx_template_version": $(COLLECTION_TEMPLATE_VERSION)}' ansible-galaxy collection build awx_collection_build --force --output-path=awx_collection_build build_collection: awx_collection_build