mirror of
https://github.com/kubeshark/kubeshark.git
synced 2026-01-25 14:43:51 +00:00
39 lines
1.0 KiB
YAML
39 lines
1.0 KiB
YAML
name: ci
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'develop'
|
|
- 'main'
|
|
jobs:
|
|
docker:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Get base image name
|
|
shell: bash
|
|
run: echo "##[set-output name=image;]$(echo gcr.io/up9-docker-hub/mizu/${GITHUB_REF#refs/heads/})"
|
|
id: base_image_step
|
|
- name: Docker meta
|
|
id: meta
|
|
uses: crazy-max/ghaction-docker-meta@v2
|
|
with:
|
|
images: ${{ steps.base_image_step.outputs.image }}
|
|
tags: |
|
|
type=sha
|
|
type=raw,${{ github.sha }}
|
|
type=raw,latest
|
|
- 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 }}
|