From ab7c481f83b50835a9c498f15bbc421357398412 Mon Sep 17 00:00:00 2001 From: sadnub Date: Sat, 28 Nov 2020 09:47:27 -0500 Subject: [PATCH] Create docker-build-push.yml --- .github/workflows/docker-build-push.yml | 88 +++++++++++++++++++++++++ 1 file changed, 88 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 00000000..c4b0f34d --- /dev/null +++ b/.github/workflows/docker-build-push.yml @@ -0,0 +1,88 @@ +name: Publish Tactical Docker Images +on: + push: + tags: + - "v*.*.*" +jobs: + docker: + name: Build and Push Docker Images + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v2 + + - name: Get Github Tag + id: prep + run: | + echo ::set-output name=version::${GITHUB_REF#refs/tags/v} + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and Push Tactical Image + uses: docker/build-push-action@v2 + with: + context: . + push: true + pull: true + file: ./docker/containers/tactical/dockerfile + platforms: linux/amd64 + tags: tacticalrmm/tactical:${{ steps.prep.outputs.version }},sadnub/tactical:latest + + - name: Build and Push Tactical MeshCentral Image + uses: docker/build-push-action@v2 + with: + context: . + push: true + pull: true + file: ./docker/containers/tactical-meshcentral/dockerfile + platforms: linux/amd64 + tags: tacticalrmm/tactical-meshcentral:${{ steps.prep.outputs.version }},sadnub/tactical-meshcentral:latest + + - name: Build and Push Tactical NATS Image + uses: docker/build-push-action@v2 + with: + context: . + push: true + pull: true + file: ./docker/containers/tactical-nats/dockerfile + platforms: linux/amd64 + tags: tacticalrmm/tactical-nats:${{ steps.prep.outputs.version }},sadnub/tactical-nats:latest + + - name: Build and Push Tactical Salt Image + uses: docker/build-push-action@v2 + with: + context: . + push: true + pull: true + file: ./docker/containers/tactical-salt/dockerfile + platforms: linux/amd64 + tags: tacticalrmm/tactical-salt:${{ steps.prep.outputs.version }},sadnub/tactical-salt:latest + + - name: Build and Push Tactical Frontend Image + uses: docker/build-push-action@v2 + with: + context: . + push: true + pull: true + file: ./docker/containers/tactical-frontend/dockerfile + platforms: linux/amd64 + tags: tacticalrmm/tactical-frontend:${{ steps.prep.outputs.version }},sadnub/tactical-frontend:latest + + - name: Build and Push Tactical Nginx Image + uses: docker/build-push-action@v2 + with: + context: . + push: true + pull: true + file: ./docker/containers/tactical-nginx/dockerfile + platforms: linux/amd64 + tags: tacticalrmm/tactical-nginx:${{ steps.prep.outputs.version }},sadnub/tactical-nginx:latest