From 7c38128019f6c56a5c66665a615b4e457162a0c8 Mon Sep 17 00:00:00 2001 From: askiiart Date: Fri, 1 Sep 2023 22:00:46 -0500 Subject: [PATCH] Change to download-only --- .drone.yml | 3 +-- download-build-push.sh => download.sh | 21 +-------------------- 2 files changed, 2 insertions(+), 22 deletions(-) rename download-build-push.sh => download.sh (51%) diff --git a/.drone.yml b/.drone.yml index ed76783..44da8ed 100644 --- a/.drone.yml +++ b/.drone.yml @@ -5,8 +5,7 @@ steps: - name: Download dart sass and hugo image: debian:stable-slim commands: - - 'find / -name "Dockerfile"' - - 'ls /drone/src' + - '/drone/src/download.sh' - name: build and publish docker image image: plugins/docker pull: always diff --git a/download-build-push.sh b/download.sh similarity index 51% rename from download-build-push.sh rename to download.sh index 51dac7c..7937981 100755 --- a/download-build-push.sh +++ b/download.sh @@ -1,24 +1,5 @@ #!/usr/bin/env sh -ORG=askiiart -NAME=hugo -PUSH=yes - curl $(curl -s https://api.github.com/repos/sass/dart-sass/releases/latest | grep "browser_download_url.*dart-sass-.*-linux-x64.tar.gz" | cut -d : -f 2,3 | tr -d \") -LO curl $(curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest | grep "browser_download_url.*hugo_.*_linux-amd64.tar.gz" | head --lines 1 | cut -d : -f 2,3 | tr -d \") -LO - tar -xzf dart-sass-*.tar.gz -tar -xzf hugo_*_linux-amd64.tar.gz --one-top-level - -VERSION=$(find . -name "hugo_*_linux-amd64" | sed 's/.*_\(.*\)_.*/\1/') -ID=$(docker build . -q) - -if PUSH=yes; then - echo hi - exit -fi - -docker tag ${ID} ${ORG}/${NAME}:latest -docker tag ${ID} ${ORG}/${NAME}:v${VERSION} -docker push ${ORG}/${NAME}:latest -docker push ${ORG}/${NAME}:v${VERSION} - +tar -xzf hugo_*_linux-amd64.tar.gz --one-top-level \ No newline at end of file