diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 87b3b971..cb762a49 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -60,3 +60,21 @@ jobs: # run: curl -v https://tripbot:8080/health # - name: Run test suite # run: docker exec tripbot go test ./... + + push: + name: Push Docker images + needs: build + runs-on: ubuntu-latest + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') + steps: + #TODO: do I need this? + - id: get-ref + uses: ankitvgupta/ref-to-tag-action@master + with: + ref: ${{ github.ref }} + head_ref: ${{ github.head_ref }} + - name: Push Docker images + env: + VERSION_TAG: ${{ steps.get-ref.outputs.tag }} + run: | + docker-compose --project-directory . --env-file infra/docker/env.docker -f infra/docker/docker-compose.yml -f infra/docker/docker-compose.testing.yml -f infra/docker/docker-compose.github.yml push