mxssl / tg-captcha-bot

Telegram Сaptcha Bot
https://t.me/cloud_tg_captcha_bot
MIT License
264 stars 87 forks source link

Update Docker Build & Publish and add ARM image #89

Open PlugFox opened 9 months ago

PlugFox commented 9 months ago

Example Result

name: Build & Push Docker Images

on:
  workflow_dispatch:
    inputs:
      version:
        description: "Version"
        required: true

jobs:
  build_and_push:
    name: "Build & Push"
    runs-on: ubuntu-latest
    defaults:
      run:
        working-directory: ./
    timeout-minutes: 60
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2

      - name: Log in to Docker Hub
        uses: docker/login-action@v2
        with:
          username: ${{ secrets.DOCKER_HUB_USERNAME }}
          password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

      - name: Build and push image
        uses: docker/build-push-action@v4
        with:
          context: .
          file: ./Dockerfile
          platforms: linux/arm64, linux/amd64
          push: true
          tags: ${{ secrets.DOCKER_HUB_USERNAME }}/tg-captcha-bot:latest, ${{ secrets.DOCKER_HUB_USERNAME }}/tg-captcha-bot:${{ github.event.inputs.version }}