Skip to content

Build and push docker images #8

Build and push docker images

Build and push docker images #8

name: Build and push docker images
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: verdel
password: ${{ secrets.DOCKER_PAT }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
verdel/torrent-telegram-bot:${{ github.ref_name }}
verdel/torrent-telegram-bot:latest