File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,16 +19,27 @@ jobs:
1919 uses : actions/checkout@v4
2020 with :
2121 fetch-depth : 0
22+
23+ - name : Get push type
24+ id : push-type
25+ run : |
26+ echo "Getting push type"
27+ PUSH_TYPE='commit'
28+ if ${{ github.event.forced }} || ${{ github.event.before == '0000000000000000000000000000000000000000' }}; then
29+ PUSH_TYPE='branch'
30+ fi
31+ echo "Push type: $PUSH_TYPE"
32+ echo "push_type=$PUSH_TYPE" >> $GITHUB_OUTPUT
2233
2334 - name : Get changed files
2435 id : changed-files
2536 run : |
26- echo "Getting changed files from ${{ github.event.before }} to ${{ github.event.after }}"
27- if ${{ github.event.forced }} || ${{ github.event.before == '0000000000000000000000000000000000000000' }}; then
37+ if ${{ steps.changed-files.outputs.changed_files == 'branch'}}; then
2838 echo "First commit on feature branch or force push - getting all changed files compared to 'develop'"
2939 git fetch origin develop
3040 CHANGED_FILES=$(git diff --name-only remotes/origin/develop ${{ github.event.after }} | xargs)
3141 else
42+ echo "Getting changed files from ${{ github.event.before }} to ${{ github.event.after }}"
3243 CHANGED_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | xargs)
3344 fi
3445 for file in $CHANGED_FILES; do
You can’t perform that action at this time.
0 commit comments