From fd6dfa01c8f91e78d0d697546c4843da429fd213 Mon Sep 17 00:00:00 2001 From: darmiel <71837281+darmiel@users.noreply.github.com> Date: Mon, 5 Apr 2021 11:37:28 +0200 Subject: [PATCH] Added deploy action to docker hub --- .github/workflows/deploy_hub_tags.yml | 32 +++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/deploy_hub_tags.yml diff --git a/.github/workflows/deploy_hub_tags.yml b/.github/workflows/deploy_hub_tags.yml new file mode 100644 index 0000000..0257a7b --- /dev/null +++ b/.github/workflows/deploy_hub_tags.yml @@ -0,0 +1,32 @@ +name: Deploy to docker hub (v-tag) + +on: + push: + branches: + - master + tags: + - 'v*' + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@master + + - name: Login to docker hub + if: success() + uses: actions-hub/docker/login@master + env: + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build image + if: success() + run: docker build -t ${GITHUB_REPOSITORY}:${IMAGE_TAG} . + + - name: Push to docker registry + if: success() + uses: actions-hub/docker@master + with: + args: push ${GITHUB_REPOSITORY}:${IMAGE_TAG} \ No newline at end of file