Fix build image workflow (#5556)

- push the autoscale image
- only run workflow if certain paths change
This commit is contained in:
Dave Protasowski 2023-05-09 12:20:01 -04:00 committed by GitHub
parent 098a9da831
commit 0ddda9a638
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -3,6 +3,10 @@ name: Build Images
on: on:
push: push:
branches: ['main'] branches: ['main']
paths:
- "code-samples/serving/hello-world/helloworld-go/**"
- "docs/serving/autoscaling/autoscale-go/**"
- "hack/docker/**"
jobs: jobs:
build-and-push-image: build-and-push-image:
@ -43,7 +47,7 @@ jobs:
- name: Build autoscale-go image - name: Build autoscale-go image
uses: docker/build-push-action@v4 uses: docker/build-push-action@v4
with: with:
push: false push: true
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
context: ./docs/serving/autoscaling/autoscale-go context: ./docs/serving/autoscaling/autoscale-go
tags: ghcr.io/knative/autoscale-go:latest tags: ghcr.io/knative/autoscale-go:latest