Skip to content

Build and Publish Docker Image #2

Build and Publish Docker Image

Build and Publish Docker Image #2

Workflow file for this run

on:
workflow_dispatch:
push:
branches:
- main*
tags:
- 'v*'
name: Build and Publish Docker Image
jobs:
build-docker:
name: Build Docker Image

Check failure on line 11 in .github/workflows/build_push.yml

View workflow run for this annotation

GitHub Actions / Build and Publish Docker Image

Invalid workflow file

The workflow is not valid. .github/workflows/build_push.yml (Line: 11, Col: 5): Required property is missing: runs-on
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: docker/setup-buildx-action@v2
with:
driver-opts: "image=moby/buildkit:v0.10.5" # avoid unknown/unknown arch in ghcr
- name: Define docker image meta data tags
id: meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/obolnetwork/goteth
tags: |
# Tag "git short sha" on all git events
type=sha,prefix=
# Tag "next" on git-push-to-main-branch events
type=raw,value=next,event=branch,enable={{is_default_branch}}
# Tag "latest" on git-tag events
type=raw,value=latest,event=tag
# Tag "tag ref" on git-tag events
type=ref,event=tag
- name: Login to Github container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
build-args: |
GITHUB_SHA=${{ github.sha }}
GO_BUILD_FLAG=${{ env.GO_BUILD_FLAG }}
tags: ${{ steps.meta.outputs.tags }}