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 - name: Download dart sass and hugo
image: debian:stable-slim image: debian:stable-slim
commands: commands:
- 'find / -name "Dockerfile"' - '/drone/src/download.sh'
- 'ls /drone/src'
- name: build and publish docker image - name: build and publish docker image
image: plugins/docker image: plugins/docker
pull: always pull: always

View file

@ -1,24 +1,5 @@
#!/usr/bin/env sh #!/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/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 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 dart-sass-*.tar.gz
tar -xzf hugo_*_linux-amd64.tar.gz --one-top-level 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}