Skip to content

Commit

Permalink
updated pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanwclark committed Sep 23, 2021
1 parent d7c01ad commit 193430e
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 48 deletions.
48 changes: 24 additions & 24 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ jobs:
case ${BRANCH} in
"main" | "master" )
if [ -n "${{ secrets.LATEST }}" ] ; then
if [ "${RELEASE}-slim" = "${{ secrets.LATEST }}" ]; then
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE}-slim,${DOCKER_IMAGE}:${RELEASE}-slim-latest,${DOCKER_IMAGE}:latest"
if [ "${RELEASE}" = "${{ secrets.LATEST }}" ]; then
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE},${DOCKER_IMAGE}:${RELEASE}-latest,${DOCKER_IMAGE}:latest"
else
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE}-slim,${DOCKER_IMAGE}:${RELEASE-latest}"
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE},${DOCKER_IMAGE}:${RELEASE-latest}"
fi
else
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE}-slim,${DOCKER_IMAGE}:${RELEASE}-slim-latest"
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE},${DOCKER_IMAGE}:${RELEASE}-latest"
fi
;;
"develop" )
Expand All @@ -55,7 +55,7 @@ jobs:
fi
if [[ $GITHUB_REF == refs/tags/* ]]; then
GITTAG="${DOCKER_IMAGE}:$(echo $GITHUB_REF | sed 's|refs/tags/||g')_${RELEASE}-slim"
GITTAG="${DOCKER_IMAGE}:$(echo $GITHUB_REF | sed 's|refs/tags/||g')_${RELEASE}"
fi
if [ -n "${BRANCHTAG}" ] && [ -n "${GITTAG}" ]; then
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
- name: Switch
id: Switch
run: |
sed -i "s|FROM debian:.*|FROM debian:${RELEASE}-slim|g" Dockerfile
sed -i "s|FROM debian:.*|FROM debian:${RELEASE}|g" Dockerfile
- name: Build
uses: docker/build-push-action@v2
Expand Down Expand Up @@ -136,13 +136,13 @@ jobs:
case ${BRANCH} in
"main" | "master" )
if [ -n "${{ secrets.LATEST }}" ] ; then
if [ "${RELEASE}-slim" = "${{ secrets.LATEST }}" ]; then
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE}-slim,${DOCKER_IMAGE}:${RELEASE}-slim-latest,${DOCKER_IMAGE}:latest"
if [ "${RELEASE}" = "${{ secrets.LATEST }}" ]; then
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE},${DOCKER_IMAGE}:${RELEASE}-latest,${DOCKER_IMAGE}:latest"
else
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE}-slim,${DOCKER_IMAGE}:${RELEASE-latest}"
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE},${DOCKER_IMAGE}:${RELEASE-latest}"
fi
else
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE}-slim,${DOCKER_IMAGE}:${RELEASE}-slim-latest"
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE},${DOCKER_IMAGE}:${RELEASE}-latest"
fi
;;
"develop" )
Expand All @@ -163,7 +163,7 @@ jobs:
fi
if [[ $GITHUB_REF == refs/tags/* ]]; then
GITTAG="${DOCKER_IMAGE}:$(echo $GITHUB_REF | sed 's|refs/tags/||g')_${RELEASE}-slim"
GITTAG="${DOCKER_IMAGE}:$(echo $GITHUB_REF | sed 's|refs/tags/||g')_${RELEASE}"
fi
if [ -n "${BRANCHTAG}" ] && [ -n "${GITTAG}" ]; then
Expand Down Expand Up @@ -215,7 +215,7 @@ jobs:
- name: Switch
id: Switch
run: |
sed -i "s|FROM debian:.*|FROM debian:${RELEASE}-slim|g" Dockerfile
sed -i "s|FROM debian:.*|FROM debian:${RELEASE}|g" Dockerfile
- name: Build
uses: docker/build-push-action@v2
Expand Down Expand Up @@ -244,13 +244,13 @@ jobs:
case ${BRANCH} in
"main" | "master" )
if [ -n "${{ secrets.LATEST }}" ] ; then
if [ "${RELEASE}-slim" = "${{ secrets.LATEST }}" ]; then
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE}-slim,${DOCKER_IMAGE}:${RELEASE}-slim-latest,${DOCKER_IMAGE}:latest"
if [ "${RELEASE}" = "${{ secrets.LATEST }}" ]; then
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE},${DOCKER_IMAGE}:${RELEASE}-latest,${DOCKER_IMAGE}:latest"
else
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE}-slim,${DOCKER_IMAGE}:${RELEASE-latest}"
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE},${DOCKER_IMAGE}:${RELEASE-latest}"
fi
else
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE}-slim,${DOCKER_IMAGE}:${RELEASE}-slim-latest"
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE},${DOCKER_IMAGE}:${RELEASE}-latest"
fi
;;
"develop" )
Expand All @@ -271,7 +271,7 @@ jobs:
fi
if [[ $GITHUB_REF == refs/tags/* ]]; then
GITTAG="${DOCKER_IMAGE}:$(echo $GITHUB_REF | sed 's|refs/tags/||g')_${RELEASE}-slim"
GITTAG="${DOCKER_IMAGE}:$(echo $GITHUB_REF | sed 's|refs/tags/||g')_${RELEASE}"
fi
if [ -n "${BRANCHTAG}" ] && [ -n "${GITTAG}" ]; then
Expand Down Expand Up @@ -323,7 +323,7 @@ jobs:
- name: Switch
id: Switch
run: |
sed -i "s|FROM debian:.*|FROM debian:${RELEASE}-slim|g" Dockerfile
sed -i "s|FROM debian:.*|FROM debian:${RELEASE}|g" Dockerfile
- name: Build
uses: docker/build-push-action@v2
Expand Down Expand Up @@ -352,13 +352,13 @@ jobs:
case ${BRANCH} in
"main" | "master" )
if [ -n "${{ secrets.LATEST }}" ] ; then
if [ "${RELEASE}-slim" = "${{ secrets.LATEST }}" ]; then
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE}-slim,${DOCKER_IMAGE}:${RELEASE}-slim-latest,${DOCKER_IMAGE}:latest"
if [ "${RELEASE}" = "${{ secrets.LATEST }}" ]; then
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE},${DOCKER_IMAGE}:${RELEASE}-latest,${DOCKER_IMAGE}:latest"
else
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE}-slim,${DOCKER_IMAGE}:${RELEASE-latest}"
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE},${DOCKER_IMAGE}:${RELEASE-latest}"
fi
else
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE}-slim,${DOCKER_IMAGE}:${RELEASE}-slim-latest"
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE},${DOCKER_IMAGE}:${RELEASE}-latest"
fi
;;
"develop" )
Expand All @@ -379,7 +379,7 @@ jobs:
fi
if [[ $GITHUB_REF == refs/tags/* ]]; then
GITTAG="${DOCKER_IMAGE}:$(echo $GITHUB_REF | sed 's|refs/tags/||g')_${RELEASE}-slim"
GITTAG="${DOCKER_IMAGE}:$(echo $GITHUB_REF | sed 's|refs/tags/||g')_${RELEASE}"
fi
if [ -n "${BRANCHTAG}" ] && [ -n "${GITTAG}" ]; then
Expand Down Expand Up @@ -431,7 +431,7 @@ jobs:
- name: Switch
id: Switch
run: |
sed -i "s|FROM debian:.*|FROM debian:${RELEASE}-slim|g" Dockerfile
sed -i "s|FROM debian:.*|FROM debian:${RELEASE}|g" Dockerfile
- name: Build
uses: docker/build-push-action@v2
Expand Down
48 changes: 24 additions & 24 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ jobs:
case ${BRANCH} in
"main" | "master" )
if [ -n "${{ secrets.LATEST }}" ] ; then
if [ "${RELEASE}-slim" = "${{ secrets.LATEST }}" ]; then
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE}-slim,${DOCKER_IMAGE}:${RELEASE}-slim-latest,${DOCKER_IMAGE}:latest"
if [ "${RELEASE}" = "${{ secrets.LATEST }}" ]; then
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE},${DOCKER_IMAGE}:${RELEASE}-latest,${DOCKER_IMAGE}:latest"
else
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE}-slim,${DOCKER_IMAGE}:${RELEASE-latest}"
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE},${DOCKER_IMAGE}:${RELEASE-latest}"
fi
else
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE}-slim,${DOCKER_IMAGE}:${RELEASE}-slim-latest"
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE},${DOCKER_IMAGE}:${RELEASE}-latest"
fi
;;
"develop" )
Expand All @@ -53,7 +53,7 @@ jobs:
fi
if [[ $GITHUB_REF == refs/tags/* ]]; then
GITTAG="${DOCKER_IMAGE}:$(echo $GITHUB_REF | sed 's|refs/tags/||g')_${RELEASE}-slim"
GITTAG="${DOCKER_IMAGE}:$(echo $GITHUB_REF | sed 's|refs/tags/||g')_${RELEASE}"
fi
if [ -n "${BRANCHTAG}" ] && [ -n "${GITTAG}" ]; then
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
- name: Switch
id: Switch
run: |
sed -i "s|FROM debian:.*|FROM debian:${RELEASE}-slim|g" Dockerfile
sed -i "s|FROM debian:.*|FROM debian:${RELEASE}|g" Dockerfile
- name: Build
uses: docker/build-push-action@v2
Expand Down Expand Up @@ -134,13 +134,13 @@ jobs:
case ${BRANCH} in
"main" | "master" )
if [ -n "${{ secrets.LATEST }}" ] ; then
if [ "${RELEASE}-slim" = "${{ secrets.LATEST }}" ]; then
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE}-slim,${DOCKER_IMAGE}:${RELEASE}-slim-latest,${DOCKER_IMAGE}:latest"
if [ "${RELEASE}" = "${{ secrets.LATEST }}" ]; then
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE},${DOCKER_IMAGE}:${RELEASE}-latest,${DOCKER_IMAGE}:latest"
else
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE}-slim,${DOCKER_IMAGE}:${RELEASE-latest}"
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE},${DOCKER_IMAGE}:${RELEASE-latest}"
fi
else
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE}-slim,${DOCKER_IMAGE}:${RELEASE}-slim-latest"
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE},${DOCKER_IMAGE}:${RELEASE}-latest"
fi
;;
"develop" )
Expand All @@ -161,7 +161,7 @@ jobs:
fi
if [[ $GITHUB_REF == refs/tags/* ]]; then
GITTAG="${DOCKER_IMAGE}:$(echo $GITHUB_REF | sed 's|refs/tags/||g')_${RELEASE}-slim"
GITTAG="${DOCKER_IMAGE}:$(echo $GITHUB_REF | sed 's|refs/tags/||g')_${RELEASE}"
fi
if [ -n "${BRANCHTAG}" ] && [ -n "${GITTAG}" ]; then
Expand Down Expand Up @@ -213,7 +213,7 @@ jobs:
- name: Switch
id: Switch
run: |
sed -i "s|FROM debian:.*|FROM debian:${RELEASE}-slim|g" Dockerfile
sed -i "s|FROM debian:.*|FROM debian:${RELEASE}|g" Dockerfile
- name: Build
uses: docker/build-push-action@v2
Expand Down Expand Up @@ -242,13 +242,13 @@ jobs:
case ${BRANCH} in
"main" | "master" )
if [ -n "${{ secrets.LATEST }}" ] ; then
if [ "${RELEASE}-slim" = "${{ secrets.LATEST }}" ]; then
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE}-slim,${DOCKER_IMAGE}:${RELEASE}-slim-latest,${DOCKER_IMAGE}:latest"
if [ "${RELEASE}" = "${{ secrets.LATEST }}" ]; then
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE},${DOCKER_IMAGE}:${RELEASE}-latest,${DOCKER_IMAGE}:latest"
else
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE}-slim,${DOCKER_IMAGE}:${RELEASE-latest}"
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE},${DOCKER_IMAGE}:${RELEASE-latest}"
fi
else
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE}-slim,${DOCKER_IMAGE}:${RELEASE}-slim-latest"
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE},${DOCKER_IMAGE}:${RELEASE}-latest"
fi
;;
"develop" )
Expand All @@ -269,7 +269,7 @@ jobs:
fi
if [[ $GITHUB_REF == refs/tags/* ]]; then
GITTAG="${DOCKER_IMAGE}:$(echo $GITHUB_REF | sed 's|refs/tags/||g')_${RELEASE}-slim"
GITTAG="${DOCKER_IMAGE}:$(echo $GITHUB_REF | sed 's|refs/tags/||g')_${RELEASE}"
fi
if [ -n "${BRANCHTAG}" ] && [ -n "${GITTAG}" ]; then
Expand Down Expand Up @@ -321,7 +321,7 @@ jobs:
- name: Switch
id: Switch
run: |
sed -i "s|FROM debian:.*|FROM debian:${RELEASE}-slim|g" Dockerfile
sed -i "s|FROM debian:.*|FROM debian:${RELEASE}|g" Dockerfile
- name: Build
uses: docker/build-push-action@v2
Expand Down Expand Up @@ -350,13 +350,13 @@ jobs:
case ${BRANCH} in
"main" | "master" )
if [ -n "${{ secrets.LATEST }}" ] ; then
if [ "${RELEASE}-slim" = "${{ secrets.LATEST }}" ]; then
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE}-slim,${DOCKER_IMAGE}:${RELEASE}-slim-latest,${DOCKER_IMAGE}:latest"
if [ "${RELEASE}" = "${{ secrets.LATEST }}" ]; then
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE},${DOCKER_IMAGE}:${RELEASE}-latest,${DOCKER_IMAGE}:latest"
else
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE}-slim,${DOCKER_IMAGE}:${RELEASE-latest}"
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE},${DOCKER_IMAGE}:${RELEASE-latest}"
fi
else
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE}-slim,${DOCKER_IMAGE}:${RELEASE}-slim-latest"
BRANCHTAG="${DOCKER_IMAGE}:${RELEASE},${DOCKER_IMAGE}:${RELEASE}-latest"
fi
;;
"develop" )
Expand All @@ -377,7 +377,7 @@ jobs:
fi
if [[ $GITHUB_REF == refs/tags/* ]]; then
GITTAG="${DOCKER_IMAGE}:$(echo $GITHUB_REF | sed 's|refs/tags/||g')_${RELEASE}-slim"
GITTAG="${DOCKER_IMAGE}:$(echo $GITHUB_REF | sed 's|refs/tags/||g')_${RELEASE}"
fi
if [ -n "${BRANCHTAG}" ] && [ -n "${GITTAG}" ]; then
Expand Down Expand Up @@ -429,7 +429,7 @@ jobs:
- name: Switch
id: Switch
run: |
sed -i "s|FROM debian:.*|FROM debian:${RELEASE}-slim|g" Dockerfile
sed -i "s|FROM debian:.*|FROM debian:${RELEASE}|g" Dockerfile
- name: Build
uses: docker/build-push-action@v2
Expand Down

0 comments on commit 193430e

Please sign in to comment.