From 6017ff0a55415ba58d245b3e01b0e139f3e12cfc Mon Sep 17 00:00:00 2001 From: gadotroee <55343099+gadotroee@users.noreply.github.com> Date: Thu, 29 Apr 2021 12:47:23 +0300 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 40 ++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7dc9a7753..55cec25c5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,19 +1,39 @@ name: ci + on: push: branches: - - 'develop' - - 'main' + - 'feature/try_github_action' jobs: docker: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - name: checkout - - name: build push docker image to gcr - uses: sendinblue/build-and-push-action@main + - name: Checkout + uses: actions/checkout@v2 + - name: Docker meta + id: meta + uses: crazy-max/ghaction-docker-meta@v2 with: - image-name: 'mizu/${GITHUB_REF##*/}' - gcp-project-id: 'up9-docker-hub' - gcp-service-account-key: ${{ secrets.GCR_JSON_KEY }} - + # list of Docker images to use as base name for tags + images: gcr.io/up9-docker-hub/mizu + # generate Docker tags based on the following events/attributes + tags: | + type=ref,event=branch + type=sha +# - name: Set up QEMU +# uses: docker/setup-qemu-action@v1 +# - name: Set up Docker Buildx +# uses: docker/setup-buildx-action@v1 + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + registry: gcr.io + username: _json_key + password: ${{ secrets.GCR_JSON_KEY }} + - name: Build and push + uses: docker/build-push-action@v2 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}