Skip to content

bug: NERC Execution (#19) #5

bug: NERC Execution (#19)

bug: NERC Execution (#19) #5

Workflow file for this run

name: runner
on:
workflow_dispatch:
push:
paths:
- 'packages/runner/**'
branches:
- main
tags:
- "v*.*.*"
pull_request:
paths:
- 'packages/runner/**'
branches:
- main
jobs:
docker:
name: Docker Build and Push
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/runner
steps:
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- name: Checkout repository
uses: actions/checkout@v3
- name: Docker Tags
id: meta
uses: docker/metadata-action@v4
with:
images: |
hicsail/comets-runner
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}
type=semver,pattern={{major}}.{{minor}}
- name: Login to Docker Hub
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build & Push Docker Build
uses: docker/build-push-action@v4
with:
push: ${{ github.event_name != 'pull_request' }}
context: ./packages/runner
file: ./packages/runner/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha,scope=gateway
cache-to: type=gha,mode=max,scope=gateway