Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/publish-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build & Publish kubectl-ai image

on:
workflow_dispatch:

permissions:
contents: read
packages: write

env:
REGISTRY: ghcr.io
IMAGE_NAME: kubectl-ai

jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3

- uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker Metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}
tags: |
type=schedule,pattern={{date 'YYYYMMDD-HHmm' tz='UTC'}}
Copy link

Copilot AI Aug 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow is triggered by 'workflow_dispatch' (manual trigger) but includes a 'type=schedule' tag pattern. This tag type is only relevant for scheduled workflows and will not be applied for manual triggers. Consider using 'type=ref,event=workflow_dispatch' or removing this tag type.

Suggested change
type=schedule,pattern={{date 'YYYYMMDD-HHmm' tz='UTC'}}

Copilot uses AI. Check for mistakes.
type=raw,value=latest

- name: Build and Publish image
uses: docker/build-push-action@v5
with:
context: .
file: images/kubectl-ai/Dockerfile
push: true
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Loading