From a47773744b687e1bbd9549d594c27f2d3ffedf57 Mon Sep 17 00:00:00 2001 From: Daniel Cameron Date: Thu, 23 Dec 2021 15:28:11 +1100 Subject: [PATCH] Added github action to publish docker image upon release creation --- .github/workflows/docker_publish.yml | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/docker_publish.yml diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml new file mode 100644 index 00000000..3dabe1e4 --- /dev/null +++ b/.github/workflows/docker_publish.yml @@ -0,0 +1,33 @@ +name: Publish Docker image + +on: + release: + types: [published] + +jobs: + push_to_registry: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + with: + submodules: 'recursive' + - + name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + with: + images: gridss/gridss + - + name: Build and push + uses: docker/build-push-action@v2 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} \ No newline at end of file