Skip to content

Commit 9a5c4b9

Browse files
committed
fix(ci/github/agent-container): set the right build conditionals
1 parent 01557ae commit 9a5c4b9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/agent-container.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@ name: Build and push agent container image
22

33
# Configures this workflow to run every time a tag is created
44
on:
5+
pull_request:
6+
branches:
7+
- main
58
push:
9+
branches:
10+
- main
11+
tags:
12+
- agent/*
613
paths:
714
- agent/**
815
- containers/agent.Dockerfile
@@ -20,7 +27,7 @@ env:
2027
# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
2128
jobs:
2229
build-and-push-agent:
23-
if: ${{ ! startsWith(github.ref, 'refs/tags/operator') }}
30+
if: ${{ (! startsWith(github.ref, 'refs/tags/operator')) && ( startsWith(github.ref, 'pull/') || github.ref == 'refs/heads/main')}}
2431
runs-on: ubuntu-latest
2532
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
2633
permissions:

0 commit comments

Comments
 (0)