Skip to content

Add dockerhub to github actions #2

Add dockerhub to github actions

Add dockerhub to github actions #2

name: Build and Push Docker Image
on:
push:
branches:
- master
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to cr.kruhlmann.dev
uses: docker/login-action@v1
with:
registry: cr.kruhlmann.dev
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: |
cr.kruhlmann.dev/classicdb_bot:latest
cr.kruhlmann.dev/classicdb_bot:wotlk-latest
kruhlmann/classicdb_bot:latest
kruhlmann/classicdb_bot:wotlk-latest