From af67b4173d56f4115e388e650cee70b75cd7665e Mon Sep 17 00:00:00 2001 From: Jens Willmer Date: Thu, 1 Apr 2021 10:33:01 +0200 Subject: [PATCH] Create publish-latest-dashboard --- .github/workflows/publish-latest-dashboard | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/publish-latest-dashboard diff --git a/.github/workflows/publish-latest-dashboard b/.github/workflows/publish-latest-dashboard new file mode 100644 index 000000000..a514f7daf --- /dev/null +++ b/.github/workflows/publish-latest-dashboard @@ -0,0 +1,55 @@ +name: Publish Docker image +on: + push: + branches: [ feature/elsa-2.0 ] + #release: + # types: [published] + +jobs: + push_to_registry: + name: Push Docker image to GitHub Packages + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + with: + platforms: all + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v1 + + - name: Cache Docker layers + uses: actions/cache@v2 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.CR_PAT }} + + - name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + builder: ${{ steps.buildx.outputs.name }} + context: . + file: ./docker/Dockerfile + platforms: linux/amd64,linux/arm64,linux/arm/v7 + push: true + tags: ghcr.io/elsa-workflows/elsa-core/elsa-dashboard:latest + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache + + - name: Image digest + run: echo ${{ steps.docker_build.outputs.digest }}