[GH/WORKFLOW] Added docker workflow

This commit is contained in:
Alexis LEBEL
2023-03-31 14:09:28 +02:00
parent 42cb2e9135
commit c71b7407b7

21
.github/workflows/buildDockerImage.yml vendored Normal file
View File

@@ -0,0 +1,21 @@
# Building Docker image and pushing it to Docker Hub
name: Build Docker Image
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build Docker image
run: |
docker build -t ${{ secrets.DOCKER_USERNAME }}/botator:${{ github.sha }} .
- name: Push Docker image to Docker Hub
run: |
echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
docker push ${{ secrets.DOCKER_USERNAME }}/botator:${{ github.sha }}