From 48ab7a08de57418ff8806cd4442e75bf0a35fdc3 Mon Sep 17 00:00:00 2001 From: Vitali Semianiaka Date: Wed, 31 Dec 2025 10:44:32 +0300 Subject: [PATCH] dockerhub integration --- .gitea/workflows/build-and-test.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/build-and-test.yml b/.gitea/workflows/build-and-test.yml index aab1245..ece047b 100644 --- a/.gitea/workflows/build-and-test.yml +++ b/.gitea/workflows/build-and-test.yml @@ -11,12 +11,16 @@ jobs: - name: Checkout Code uses: actions/checkout@v4 # Uses a standard action to check out the repository code + - name: Login to the DockerHub registry + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build Docker image run: | - # docker build -t testimage:latest . - docker run --rm testimage:latest - docker images - + docker build -t ${{ variables.DOCKERHUB_IMAGENAME }} . + docker push - name: Run tests (example) - run: echo "Tests passed!" + run: docker run --rm ${{ variables.DOCKERHUB_IMAGENAME }}