From ffad3f89ef2c47b515ba59cec7c03075367ce326 Mon Sep 17 00:00:00 2001 From: Ignacio Hagopian Date: Mon, 29 Mar 2021 14:35:52 -0300 Subject: [PATCH 1/2] upgrade to v2 in shared infra Signed-off-by: Ignacio Hagopian --- .github/workflows/docker.yml | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 4dc766b78..6d0a98a7d 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -7,17 +7,27 @@ on: - master jobs: docker: - name: Docker publishing - runs-on: self-hosted + runs-on: ubuntu-latest steps: - - name: Check out code - uses: actions/checkout@v1 - - name: Publish - uses: docker/build-push-action@v2 + - uses: actions/checkout@v2 + - name: Get git sha + id: git_sha + run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" + - name: Check outputs + run: echo ${{ steps.git_sha.outputs.sha_short }} + - name: Fail if no git sha + run: exit 1 + if: ${{ steps.git_sha.outputs.sha_short == 0 }} + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - name: Login to DockerHub + uses: docker/login-action@v1 with: username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - dockerfile: Dockerfile - repository: textile/powergate - tag_with_ref: true - tag_with_sha: true + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + push: true + tags: textile/powergate:latest,textile/powergate:sha-${{ steps.git_sha.outputs.sha_short }} From b37836e124c5c09b6c7e13206e6c29429de1124f Mon Sep 17 00:00:00 2001 From: Ignacio Hagopian Date: Mon, 29 Mar 2021 16:09:46 -0300 Subject: [PATCH 2/2] add name again Signed-off-by: Ignacio Hagopian --- .github/workflows/docker.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 6d0a98a7d..bced0e650 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -7,6 +7,7 @@ on: - master jobs: docker: + name: Docker publishing runs-on: ubuntu-latest steps: - uses: actions/checkout@v2