From dd7f60be3988339cae91e3d7e83e28b24cf6061e Mon Sep 17 00:00:00 2001 From: Adi Muraru Date: Sat, 11 Apr 2020 03:06:19 +0300 Subject: [PATCH] [BUILD] - Publish docker image to adobe/kafka-operator docker hub repo --- .github/workflows/build-push-docker.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/build-push-docker.yml diff --git a/.github/workflows/build-push-docker.yml b/.github/workflows/build-push-docker.yml new file mode 100644 index 000000000..ed05dbca9 --- /dev/null +++ b/.github/workflows/build-push-docker.yml @@ -0,0 +1,25 @@ +name: build-publish-docker-image + +on: + push: + tags: + - '*' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Get tag name + id: vars + run: echo ::set-output name=tag::${GITHUB_REF:10} + - uses: docker/build-push-action@v1 + with: + dockerfile: Dockerfile + build_args: VERSION=${{ steps.vars.outputs.tag }},GIT_SHA=${{ github.sha }} + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + repository: adobe/kafka-operator + tag_with_ref: true + push: ${{ startsWith(github.ref, 'refs/tags/') }} + add_git_labels: true