[add] Action for task b; push to main repo

This commit is contained in:
Milos Obrenovic 2025-02-14 10:54:31 +01:00
parent 856058c92d
commit 466cc92c52

34
.github/workflows/build.yml vendored Normal file
View file

@ -0,0 +1,34 @@
name: Create and push docker image to Docker Hub.
on:
push:
branches: [ main ]
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout the code from main branch
uses: actions/checkout@v4
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.9.0
-
name: Build and push Docker images
uses: docker/build-push-action@v6.13.0
with:
push: true
tags: user/main:action