From 466cc92c5265236fac404f58f35fdf8318162d78 Mon Sep 17 00:00:00 2001 From: Milos Obrenovic Date: Fri, 14 Feb 2025 10:54:31 +0100 Subject: [PATCH] [add] Action for task b; push to main repo --- .github/workflows/build.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..cd59409c0 --- /dev/null +++ b/.github/workflows/build.yml @@ -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 +