@@ -56,19 +56,25 @@ jobs:
56
56
${{ matrix.install_dependencies }}
57
57
${{ matrix.set_display }}
58
58
- name : Build with Maven
59
- run : mvn -B -ntp -q verify --file pom.xml -P 'build,${{ matrix.browser }}'
59
+ run : |
60
+ mvn -B -ntp -q verify --file pom.xml -P 'build,${{ matrix.browser }}'
60
61
- name : Delete output.xml (on Win)
61
62
run : |
62
63
Get-ChildItem target/robotframework-reports -Include *output.xml -Recurse | Remove-Item
63
64
echo "REPORT_FILE=$(Get-ChildItem target/robotframework-reports -Include *report.html -Recurse -Name)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
65
+ echo "SHA=$(("${{ github.event_name }}" -eq "push") ? "${{ github.sha }}" : "${{ github.event.pull_request.head.sha }}")" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
64
66
if : always() && runner.os == 'Windows'
65
67
66
68
- name : Delete output.xml (on Unix-like)
67
69
run : |
68
70
find target/robotframework-reports -type f -name '*output.xml' -exec rm {} +
69
71
echo "REPORT_FILE=$(find target/robotframework-reports -type f -name '*report.html' | sed 's#.*/##')" >> $GITHUB_ENV
72
+ echo "SHA=$([ "${{ github.event_name }}" == "push" ] && echo "${{ github.sha }}" || echo "${{ github.event.pull_request.head.sha }}")" >> $GITHUB_ENV
70
73
if : always() && runner.os != 'Windows'
71
74
75
+ - name : Print actual triggering commit
76
+ run : echo "${{ env.SHA }}"
77
+
72
78
- name : Archive acceptances test results
73
79
74
80
with :
@@ -92,33 +98,18 @@ jobs:
92
98
with :
93
99
route : POST /repos/{repository}/statuses/{sha}
94
100
repository : ${{ github.repository }}
95
- sha : ${{ github.event.pull_request.head.sha }}
101
+ sha : " ${{env.SHA}} "
96
102
state : " ${{steps.upload_results.outputs.JOB_STATUS}}"
97
103
target_url : " ${{steps.upload_results.outputs.REPORT_URL}}"
98
104
description : " Link to test report."
99
105
context : at-results-${{ matrix.browser }}-${{ matrix.os }}-${{ matrix.java-version }}
100
106
env :
101
107
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
102
- if : always() && job.status == 'failure' && github.event.pull_request
103
-
104
- - uses : octokit/request-action@7e93b91076fad3920c29d44eb2a6311d929db3dd
105
- name : Update status with Github Status API
106
- id : update_status_push
107
- with :
108
- route : POST /repos/{repository}/statuses/{sha}
109
- repository : ${{ github.repository }}
110
- sha : ${{ github.sha }}
111
- state : " ${{env.JOB_STATUS}}"
112
- target_url : " ${{env.REPORT_URL}}"
113
- description : " Link to test report."
114
- context : at-results-${{ matrix.browser }}-${{ matrix.os }}-${{ matrix.java-version }}
115
- env :
116
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
117
- if : always() && job.status == 'failure' && github.event.push
108
+ if : always() && job.status == 'failure'
118
109
119
110
release :
120
111
needs : [build_and_test]
121
- if : github.event. push
112
+ if : github.event_name == ' push'
122
113
runs-on : ubuntu-latest
123
114
name : Release package
124
115
steps :
@@ -135,4 +126,4 @@ jobs:
135
126
gpg_passphrase : ${{ secrets.gpg_passphrase }}
136
127
nexus_username : ${{ secrets.nexus_username }}
137
128
nexus_password : ${{ secrets.nexus_password }}
138
- maven_args : -DskipTests
129
+ maven_args : -DskipTests
0 commit comments