From 537c1a8633fe6dc7e9c1471fb94930bc70de0413 Mon Sep 17 00:00:00 2001 From: Yevhen Zavhorodnii Date: Tue, 5 Nov 2024 15:43:35 +0000 Subject: [PATCH] Release on tag creation --- .github/workflows/release-docker.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/release-docker.yml diff --git a/.github/workflows/release-docker.yml b/.github/workflows/release-docker.yml new file mode 100644 index 00000000..96980b88 --- /dev/null +++ b/.github/workflows/release-docker.yml @@ -0,0 +1,28 @@ +name: Publish Docker image to Docker Hub + +on: + push: + tags: + - "*" + +jobs: + build-and-push: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Log in to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build Docker image + run: | + docker build -t threagile/threagile:${{ github.ref_name }} -f Dockerfile . + + - name: Push Docker image + run: | + docker push threagile/threagile:${{ github.ref_name }}