Update main.yml

This commit is contained in:
gadotroee 2021-04-29 12:47:23 +03:00 committed by GitHub
parent a21a3868c6
commit 6017ff0a55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,19 +1,39 @@
name: ci name: ci
on: on:
push: push:
branches: branches:
- 'develop' - 'feature/try_github_action'
- 'main'
jobs: jobs:
docker: docker:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - name: Checkout
name: checkout uses: actions/checkout@v2
- name: build push docker image to gcr - name: Docker meta
uses: sendinblue/build-and-push-action@main id: meta
uses: crazy-max/ghaction-docker-meta@v2
with: with:
image-name: 'mizu/${GITHUB_REF##*/}' # list of Docker images to use as base name for tags
gcp-project-id: 'up9-docker-hub' images: gcr.io/up9-docker-hub/mizu
gcp-service-account-key: ${{ secrets.GCR_JSON_KEY }} # 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 }}