Update main.yml

This commit is contained in:
sᴧᴍᴜᴇʟ ᴍ 2024-02-14 00:03:33 +00:00 committed by GitHub
parent 8ea29498dc
commit 451081cdfd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -20,8 +20,12 @@ jobs:
- name: Build Docker image
run: |
docker build -t sami/brudi-rclone:${{ github.ref }} .
docker tag sami/brudi-rclone:${{ github.ref }} sami/brudi-rclone:latest
if [[ ${{ github.ref }} == 'refs/heads/main' ]]; then
DOCKER_TAG=latest
else
DOCKER_TAG=${{ github.ref }}
fi
docker build -t sami/brudi-rclone:${DOCKER_TAG} .
- name: Log in to Docker Hub
uses: docker/login-action@v1
@ -31,5 +35,4 @@ jobs:
- name: Push image to Docker Hub
run: |
docker push sami/brudi-rclone:${{ github.ref }}
docker push sami/brudi-rclone:latest
docker push sami/brudi-rclone:${DOCKER_TAG}