faster uploads, including the branch name
All checks were successful
Build and push nixos-based docker container / build (push) Successful in 17s

This commit is contained in:
James Andariese 2024-08-03 23:51:51 -05:00
parent 89b334168a
commit a8697f41da

View File

@ -19,9 +19,11 @@ jobs:
skopeo login --username ${{ secrets.DOCKER_USER }} --password ${{ secrets.DOCKER_PASSWORD }} "$REGISTRY" skopeo login --username ${{ secrets.DOCKER_USER }} --password ${{ secrets.DOCKER_PASSWORD }} "$REGISTRY"
( # echo tags into the image uploader's read loop MAINTAG="sha-$(echo "$GITHUB_SHA" | cut -c 1-8)"
echo "sha-$(echo "$GITHUB_SHA" | cut -c 1-8)" nix run .#upload-image "docker://$REGISTRY/$PACKAGE:$MAINTAG"
echo "$GITHUB_REF_NAME-$(date +%Y%m%d-%H%M%S)" for TAG in \
) | while read -r TAG;do "$GITHUB_REF_NAME" \
nix run .#upload-image "docker://$REGISTRY/$PACKAGE:$TAG" "$GITHUB_REF_NAME-$(date +%Y%m%d-%H%M%S)" \
; do
skopeo copy "docker://$REGISTRY/$PACKAGE:$MAINTAG" "docker://$REGISTRY/$PACKAGE:$TAG"
done done