Skip to content

Commit 19306ca

Browse files
authored
Update ci.yml
1 parent 38c3a2e commit 19306ca

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
name: ci
22

3-
concurrency:
4-
group: ci-${{ github.ref_name }}-${{ github.event_name }}
5-
cancel-in-progress: ${{ ! startsWith(github.ref, 'refs/tags/') }}
6-
73
on:
84
pull_request:
95
branches:
106
- main
7+
types:
8+
- opened
9+
- synchronize
1110

1211
permissions:
1312
contents: read
@@ -24,13 +23,25 @@ jobs:
2423
uses: actions/checkout@v4
2524
with:
2625
fetch-depth: 0
26+
27+
- name: Determine comparison base
28+
id: determine-base
29+
run: |
30+
if [[ ${{ github.event.action }} == "opened" ]]; then
31+
echo "::set-output name=base_ref::main"
32+
else
33+
echo "::set-output name=base_ref::${{ github.event.before }}"
34+
fi
35+
2736
- name: Get changed files
2837
id: changed-files
2938
uses: tj-actions/changed-files@v45
3039
with:
31-
since_last_remote_commit: true
40+
base-ref: ${{ steps.determine-base.outputs.base_ref }}
41+
sha: ${{ github.sha }}
3242
files: |
3343
**/Dockerfile
44+
3445
- name: Prepare
3546
id: prepare
3647
shell: python

0 commit comments

Comments
 (0)