diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c7031dea..052835d1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -102,3 +102,24 @@ jobs: run: mvn clean deploy -Dmaven.test.skip=true -Drevision=${{github.ref_name}} -DrepositoryId=github env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + publish-docker: + runs-on: ubuntu-latest + if: startsWith(github.event.ref, 'refs/tags/v') + needs: + - build + - test + steps: + - uses: actions/checkout@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{secrets.DOCKERHUB_USERNAME}} + password: ${{secrets.DOCKERHUB_TOKEN}} + - name: Build and push + uses: docker/build-push-action@v3 + with: + push: true + tags: vaimee/sepa:${{github.ref_name}},vaimee/sepa:latest