File tree 1 file changed +31
-0
lines changed
1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -67,14 +67,45 @@ jobs:
67
67
experimental : ${{ matrix.experimental }}
68
68
secrets : inherit
69
69
70
+ # -------------------------------------------------------------
71
+ # Get the NX-blessed base and head shas.
72
+ # --------------------------------------------------------------
73
+ get-shas :
74
+ runs-on : ubuntu-latest
75
+ name : Get SHA values
76
+ outputs :
77
+ base-sha : ${{ steps.set-SHAs.outputs.base }}
78
+ head-sha : ${{ steps.set-SHAs.outputs.head }}
79
+ permissions :
80
+ pull-requests : read
81
+ steps :
82
+ - name : Check out code
83
+ uses : actions/checkout@v4
84
+ with :
85
+ fetch-depth : 0
86
+
87
+ - name : Use Node LTS version
88
+ uses : actions/setup-node@v4
89
+ with :
90
+ node-version : 18
91
+ cache : yarn
92
+
93
+ - name : Derive appropriate SHAs for base and head for `nx affected` commands
94
+ id : set-SHAs
95
+ uses : nrwl/nx-set-shas@v3
96
+
70
97
# -------------------------------------------------------------
71
98
# Compare the compiled assets
72
99
# -------------------------------------------------------------
73
100
compare :
74
101
name : Compare
102
+ needs : [get-shas]
75
103
# Check that the PR is not in draft mode (or if it is, that it has the run_ci label to force a build)
76
104
if : ${{ github.event.pull_request.draft != 'true' || contains(github.event.pull_request.labels.*.name, 'run_ci') }}
77
105
uses : ./.github/workflows/compare-results.yml
106
+ with :
107
+ base-sha : ${{ needs.get-shas.outputs.base-sha }}
108
+ head-sha : ${{ needs.get-shas.outputs.head-sha }}
78
109
secrets : inherit
79
110
80
111
# -------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments