Skip to content

Commit 3ad36dc

Browse files
committed
fix: Workflow to always check container build if sync service is updated
1 parent 8d7fdb5 commit 3ad36dc

1 file changed

Lines changed: 18 additions & 9 deletions

File tree

.github/workflows/docker-build-and-push.yml

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ name: Container Image
33
on:
44
workflow_dispatch:
55
workflow_run:
6-
branches: [ "main" ]
6+
branches: [ "*" ]
77
workflows: ["Sync Service Build and Release"]
88
types:
99
- completed
10-
push:
11-
branches:
12-
- main
13-
paths:
14-
# - 'Kepware.Api/**'
15-
- 'KepwareSync.Service/**'
16-
# - '.github/workflows/docker-build-and-push.yml'
17-
- '!**/*.md' # Exclude markdown files
10+
# push:
11+
# branches:
12+
# - main
13+
# paths:
14+
# - 'Kepware.Api/**'
15+
# - 'KepwareSync.Service/**'
16+
# - '.github/workflows/docker-build-and-push.yml'
17+
# - '!**/*.md' Exclude markdown files
1818

1919
jobs:
2020
build:
@@ -50,7 +50,16 @@ jobs:
5050
id: lowercase
5151
run: echo "REPO_OWNER_LOWER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
5252

53+
- name: Build and export to Docker
54+
uses: docker/build-push-action@v6
55+
with:
56+
load: true
57+
tags: kepware-sync-service:test
58+
- name: Test
59+
run: |
60+
docker run --rm kepware-sync-service:test
5361
- name: Build and push Docker image
62+
if: ${{ github.event_name != 'pull_request'}}
5463
id: docker_build
5564
uses: docker/build-push-action@v4
5665
with:

0 commit comments

Comments
 (0)