Skip to content

tags retrieved in workflow #33

tags retrieved in workflow

tags retrieved in workflow #33

Workflow file for this run

name: Build & Deploy
on:
workflow_dispatch:
push:
branches:
- main
tags:
- "v*.*.*"
pull_request:
branches:
- main
jobs:
docker:
name: Docker Build
runs-on: ubuntu-latest
steps:
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
with:
username: ${{ secrets.DOCKERHUB_USERNAME_REPO }}
password: ${{ secrets.DOCKERHUB_TOKEN_REPO }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
hicsail/zk-oracles
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}
type=semver,pattern={{major}}.{{minor}}
- name: Build & Push Docker Build
uses: docker/build-push-action@v4
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
cache-from: type=gha,scope=build
cache-to: type=gha,mode=max,scope=build