diff --git a/.gitea/workflows/docker_build_on_tag.yml b/.gitea/workflows/docker_build_on_tag.yml new file mode 100644 index 0000000..2cb28d0 --- /dev/null +++ b/.gitea/workflows/docker_build_on_tag.yml @@ -0,0 +1,30 @@ +name: Build and Push Docker Image + +on: + push: + tags: + - '*' + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Log in to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and Push Docker Image + uses: docker/build-push-action@v4 + with: + context: . + tags: http://192.168.1.155:3000/siren:${{ github.ref_name }} + push: true