From 23091aa3f6f3cccf3f257e9fa728771bbe071966 Mon Sep 17 00:00:00 2001 From: nolim1t Date: Thu, 20 Aug 2020 15:33:30 +0700 Subject: [PATCH] Add new variable and push --- .github/workflows/on-push.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml index c34b8f9..b138c8c 100644 --- a/.github/workflows/on-push.yml +++ b/.github/workflows/on-push.yml @@ -16,6 +16,7 @@ jobs: run: | echo "::set-env name=BRANCH::$(echo ${GITHUB_REF#refs/heads/} | sed 's/\//-/g')" echo "::set-env name=SHORTSHA::$(git rev-parse --short HEAD)" + echo "::set-env name=DOCKER_HUB_REPO::specter-desktop" - name: Show set env variables run: | @@ -23,6 +24,7 @@ jobs: printf " SHORTSHA: %s\n" "$SHORTSHA" printf " REPO: %s\n" "$GITHUB_REPOSITORY" printf " COMMIT ID: %s\n" "$GITHUB_SHA" + printf " DOCKER REPO: %s\n" "$DOCKER_HUB_REPO" - name: Login to Docker Hub run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin @@ -46,5 +48,12 @@ jobs: restore-keys: | ${{ runner.os }}-buildx- - + - name: Build against latest + run: | + docker buildx build \ + --cache-from "type=local,src=/tmp/.buildx-cache" \ + --cache-to "type=local,dest=/tmp/.buildx-cache" \ + --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 \ + --tag ${{ secrets.DOCKER_HUB_USER }}/$DOCKER_HUB_REPO:$SHORTSHA \ + --output "type=registry" .