From 2e003313793df75c9be9bfb1cfea825c78b20891 Mon Sep 17 00:00:00 2001 From: Aubin Date: Wed, 2 Feb 2022 18:13:34 +0900 Subject: [PATCH] chore(ci): Update docker build action v1 seems to be deprecated, so use the v2 action. Since this action also clones the repository during docker build, we should not need the `checkout` action anymore. --- .github/workflows/main.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f858700..6b85af3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,15 +6,15 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - - name: Build and push docker image - uses: docker/build-push-action@v1 + - name: Docker Login + uses: docker/login-action@v1.12.0 with: + registry: quay.io username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - repository: wantedly/deployment-duplicator - registry: quay.io - tags: ${{ github.sha }} - tag_with_ref: true - tag_with_sha: true + + - name: Build and push docker image + uses: docker/build-push-action@v1 + with: + push: true + tags: quay.io/wantedly/deployment-duplicator:${{ github.sha }}${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && ',quay.io/wantedly/deployment-duplicator:latest' || '' }}