From c489650096e1c510df8764a1e22c5eedbcf39f83 Mon Sep 17 00:00:00 2001 From: worldtiki Date: Thu, 24 Sep 2020 17:05:11 +0100 Subject: [PATCH] Automate publish of docker images (#104) --- .github/workflows/docker-build-push.yml | 31 +++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/docker-build-push.yml diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml new file mode 100644 index 0000000..e793128 --- /dev/null +++ b/.github/workflows/docker-build-push.yml @@ -0,0 +1,31 @@ +name: Publish Docker image + +on: + push: + tags: + - '*' + +jobs: + publish-docker: + + runs-on: ubuntu-latest + + steps: + - name: Set up Go 1.14 + uses: actions/setup-go@v2.1.2 + with: + go-version: 1.14 + - name: Check out code + uses: actions/checkout@v2 + - name: Build + run: make unit-tests + + - name: Build and push Docker images on new git tags + uses: docker/build-push-action@v1 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_PASSWORD }} + repository: expediagroup/mittens + tag_with_ref: true + tags: latest + push: ${{ startsWith(github.ref, 'refs/tags/') }}