Skip to content

devops: try fixing docker related actions #15

devops: try fixing docker related actions

devops: try fixing docker related actions #15

Workflow file for this run

name: Build and Push Docker Image
on:
push:
branches:
- '**'
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_PASSWORD }}
- name: Build Docker Image
run: |
docker build -t telegram-account-bot -f bot.Dockerfile .
docker tag telegram-account-bot ${{ env.DOCKER_USERNAME }}/telegram-account-bot
docker build -t telegram-account-bot-api -f api.Dockerfile .
docker tag telegram-account-bot-api ${{ env.DOCKER_USERNAME }}/telegram-account-bot-api
- name: Push Bot Docker Image
uses: docker/build-push-action@v6
with:
context: .
path: ./bot.Dockerfile
push: true
tags: ${{ env.DOCKER_USERNAME }}/telegram-account-bot:latest
- name: Push Api Docker Image
uses: docker/build-push-action@v6
with:
context: .
path: ./api.Dockerfile
push: true
tags: ${{ env.DOCKER_USERNAME }}/telegram-account-bot-api:latest