From 8b90524a2c67f62b46ac392e2d2012adec159153 Mon Sep 17 00:00:00 2001 From: Alex Ling Date: Mon, 6 Apr 2020 21:45:08 +0800 Subject: [PATCH] Create dockerhub.yml --- .github/workflows/dockerhub.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/dockerhub.yml diff --git a/.github/workflows/dockerhub.yml b/.github/workflows/dockerhub.yml new file mode 100644 index 0000000..91d222a --- /dev/null +++ b/.github/workflows/dockerhub.yml @@ -0,0 +1,19 @@ +name: Publish Dockerhub +on: + release: + types: [published] +jobs: + update: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Get release version + id: get_version + run: echo ::set-env name=RELEASE_VERSION::$(echo ${GITHUB_REF:10}) + - name: Publish to Dockerhub + uses: elgohr/Publish-Docker-Github-Action@master + with: + name: hkalexling/mango + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + tags: "latest,${{ env.RELEASE_VERSION }}"