Skip to content

DNM: Try to reduce CI flakiness #71

DNM: Try to reduce CI flakiness

DNM: Try to reduce CI flakiness #71

name: Build and Push Bink CLI Image
on:
push:
branches: [main]
paths:
- 'Containerfile'
- 'cmd/**'
- 'internal/**'
- 'go.mod'
- 'go.sum'
pull_request:
paths:
- 'Containerfile'
- 'cmd/**'
- 'internal/**'
- 'go.mod'
- 'go.sum'
workflow_dispatch:
inputs:
push:
description: 'Push image to registry'
required: false
default: 'false'
type: boolean
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}/bink
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Log in to GHCR
if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.push)
run: podman login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ${{ env.REGISTRY }}
- name: Build bink CLI image
run: make build-bink-image
- name: Push
if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.push)
run: podman push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest