File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 17
17
18
18
steps :
19
19
- uses : actions/checkout@v4
20
+ with :
21
+ # 0 indicates all history for all branches and tags
22
+ fetch-depth : 0
20
23
21
24
- name : Set up GHC ${{ matrix.ghc-version }}
22
25
uses : haskell-actions/setup@v2
@@ -27,16 +30,18 @@ jobs:
27
30
cabal-update : true
28
31
29
32
- name : Extract New-Versions git trailer from Renovate
33
+ if : ${{ github.event_name == 'pull_request' }}
34
+ env :
35
+ GITHUB_SHA : " {{ github.event.pull_request.head.sha }}"
30
36
run : |
31
37
if [ ! -f cabal.project ]
32
38
then echo 'packages: .' > cabal.project
33
39
fi
34
- for constraint in $(git log "--format=%(trailers:key=New-Versions,valueonly=true)" -1)
40
+ echo $GITHUB_SHA
41
+ git show $GITHUB_SHA
42
+ for constraint in $(git log "--format=%(trailers:key=New-Versions,valueonly=true)" ${GITHUB_SHA}^1 ${GITHUB_SHA}^2)
35
43
do echo "constraints: $constraint" >> cabal.project
36
44
done
37
-
38
- - name : Show cabal.project
39
- run : |
40
45
cat cabal.project
41
46
42
47
- name : Configure the build
You can’t perform that action at this time.
0 commit comments