diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 9d1dd2b81..f957abf89 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -5,38 +5,19 @@ on: push: branches: - 'master' + - 'ko' tags: - 'v*' -env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} - jobs: - docker: + publish: + name: Publish runs-on: ubuntu-latest steps: - - - name: Checkout - uses: actions/checkout@v4 - - - name: Login to registry - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 + - uses: actions/setup-go@v5 with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: . - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} + go-version: '1.22.x' + - uses: actions/checkout@v3 + + - uses: ko-build/setup-ko@v0.6 + - run: ko build diff --git a/Dockerfile b/Dockerfile index 7cb201b3e..13576ab38 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/library/golang:1.20 as builder +FROM docker.io/library/golang:1.22 as builder WORKDIR /app