mirror of
https://github.com/prometheus-operator/prometheus-operator.git
synced 2025-04-21 11:48:53 +00:00
scripts: fix pushing tagged images by using github ref and push mutable 'master' tag
This commit is contained in:
parent
96094ad1ab
commit
fc44e7f072
1 changed files with 13 additions and 5 deletions
|
@ -8,16 +8,24 @@ set -u
|
|||
|
||||
CPU_ARCHS="amd64 arm64 arm"
|
||||
|
||||
# Use branch name as dev image tags
|
||||
export TAG="${GITHUB_REF#refs/heads/}"
|
||||
|
||||
# Push `-dev` images unless commit is tagged
|
||||
export REPO="${REPO:-"quay.io/prometheus-operator/prometheus-operator-dev"}"
|
||||
export REPO_PROMETHEUS_CONFIG_RELOADER="${REPO_PROMETHEUS_CONFIG_RELOADER:-"quay.io/prometheus-operator/prometheus-config-reloader-dev"}"
|
||||
if git describe --exact-match; then
|
||||
|
||||
# If TAG is not a branch name, push tagged release
|
||||
if [[ ! "${TAG}" =~ ^refs ]]; then
|
||||
export TAG="${GITHUB_REF#refs/tags/}"
|
||||
export REPO="quay.io/prometheus-operator/prometheus-operator"
|
||||
export REPO_PROMETHEUS_CONFIG_RELOADER="quay.io/prometheus-operator/prometheus-config-reloader"
|
||||
fi
|
||||
|
||||
# Push mutable `master` tag to main repositories
|
||||
if [ "${TAG}" == "master" ]; then
|
||||
export REPO="quay.io/prometheus-operator/prometheus-operator"
|
||||
export REPO_PROMETHEUS_CONFIG_RELOADER="quay.io/prometheus-operator/prometheus-config-reloader"
|
||||
export TAG="${GITHUB_REF#refs/tags/}"
|
||||
else
|
||||
# Use branch name as dev image tags
|
||||
TAG="${GITHUB_REF#refs/heads/}"
|
||||
fi
|
||||
|
||||
for arch in ${CPU_ARCHS}; do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue