From 1c3ee89ab439af87a9b1fa620bef420565684c9c Mon Sep 17 00:00:00 2001 From: Deluan Date: Sun, 26 Apr 2020 15:34:24 -0400 Subject: [PATCH] Disable docker steps if secrets are not available --- .github/workflows/pipeline.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index bfccf8bc..d240f27c 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -134,21 +134,27 @@ jobs: name: Docker images needs: [binaries] runs-on: ubuntu-latest + env: + DOCKER_IMAGE: ${{secrets.DOCKER_IMAGE}} steps: - name: Set up Docker Buildx id: buildx uses: crazy-max/ghaction-docker-buildx@v1 + if: ${{env.DOCKER_IMAGE}} != '' with: version: latest - uses: actions/checkout@v1 + if: ${{env.DOCKER_IMAGE}} != '' - uses: actions/download-artifact@v1 + if: ${{env.DOCKER_IMAGE}} != '' with: name: binaries path: dist - name: Build the Docker image and push + if: ${{env.DOCKER_IMAGE}} != '' env: DOCKER_IMAGE: ${{secrets.DOCKER_IMAGE}} DOCKER_PLATFORM: linux/amd64,linux/arm/v7,linux/arm64