From a2440d318034d23d2760573d4e61aeedd753ca01 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Fri, 19 Aug 2022 12:48:17 +0200 Subject: [PATCH] Moved to docker build from reusable workflow --- .github/workflows/docker-image-build.yml | 3 ++- scripts/docker/build | 25 ------------------------ 2 files changed, 2 insertions(+), 26 deletions(-) delete mode 100755 scripts/docker/build diff --git a/.github/workflows/docker-image-build.yml b/.github/workflows/docker-image-build.yml index aad2fefb..d850fa57 100644 --- a/.github/workflows/docker-image-build.yml +++ b/.github/workflows/docker-image-build.yml @@ -12,4 +12,5 @@ jobs: uses: shlinkio/github-actions/.github/workflows/docker-build-and-publish.yml@main secrets: inherit with: - build-and-publish-script: bash ./scripts/docker/build + image-name: shlinkio/shlink-web-client + version-arg-name: VERSION diff --git a/scripts/docker/build b/scripts/docker/build deleted file mode 100755 index 21dce541..00000000 --- a/scripts/docker/build +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -set -ex - -PLATFORMS="linux/arm/v7,linux/arm64/v8,linux/amd64" -DOCKER_IMAGE="shlinkio/shlink-web-client" - -if [[ "$GITHUB_REF" == *"develop"* ]]; then - docker buildx build --push \ - --platform ${PLATFORMS} \ - -t ${DOCKER_IMAGE}:latest -t ghcr.io/${DOCKER_IMAGE}:latest . - -# If ref is not develop, then this is a tag. Build that docker tag and also "stable" -else - VERSION=${GITHUB_REF#refs/tags/v} - TAGS="-t ${DOCKER_IMAGE}:${VERSION} -t ghcr.io/${DOCKER_IMAGE}:${VERSION}" - - # Push stable tag only if this is not an alpha or beta release - [[ $GITHUB_REF != *"alpha"* && $GITHUB_REF != *"beta"* ]] && TAGS="${TAGS} -t ${DOCKER_IMAGE}:stable -t ghcr.io/${DOCKER_IMAGE}:stable" - - docker buildx build --push \ - --build-arg VERSION=${VERSION} \ - --platform ${PLATFORMS} \ - ${TAGS} . -fi