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 }}