Trying new build strategy
All checks were successful
Build Container / Build Container (push) Successful in 4s
Build Container / Git Tag (push) Successful in 3s

This commit is contained in:
Zakary Timson 2025-04-03 23:56:38 -04:00
parent d0be16d47b
commit bfc1f185a2

View File

@ -16,15 +16,16 @@ jobs:
REGISTRY="$(echo ${{github.server_url}} | sed s%http://%% | sed s%https://%% )"
VERSION="$(cat Dockerfile | grep "ARG CADDY_VERSION" | grep -Eo '=.+' | grep -Eo '[[:alnum:]\.\/\-]+')"
docker build -t $REGISTRY/${{github.repository}}:${{ github.ref_name}} .
docker login -u ${{github.repository_owner}} -p ${{secrets.DEPLOY_TOKEN}} $REGISTRY
docker push $REGISTRY/${{github.repository}}:${{ github.ref_name}}
docker build -t $REGISTRY/${{github.repository}}:${{github.ref_name}} .
docker push $REGISTRY/${{github.repository}}:${{github.ref_name}}
if [ '${{github.ref_name}}' == 'master' ]; then
docker tag $REGISTRY/${{github.repository}}:$VERSION $REGISTRY/${{github.repository}}:${{github.ref_name}}
docker tag $REGISTRY/${{github.repository}}:${{github.ref_name}} $REGISTRY/${{github.repository}}:$VERSION
docker push $REGISTRY/${{github.repository}}:$VERSION
docker tag $REGISTRY/${{github.repository}}:latest $REGISTRY/${{github.repository}}:${{github.ref_name}} && \
docker tag $REGISTRY/${{github.repository}}:${{github.ref_name}} $REGISTRY/${{github.repository}}:latest
docker push $REGISTRY/${{github.repository}}:latest
fi