Change to download-only

This commit is contained in:
askiiart 2023-09-01 22:00:46 -05:00
parent b2e08cec93
commit 7c38128019
No known key found for this signature in database
GPG key ID: 85505F3A2264FA01
2 changed files with 2 additions and 22 deletions

View file

@ -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

View file

@ -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