Skip to content

Commit 473d29f

Browse files
authored
Align GHA workflows in the scope of report uploads (#400)
* Remove redundant if statement (already covered in 'on:' section) * Add option to upload test report for manual run on demand only * Add always statement and repo name to process-upload-report * Revert commit SHA changes * Set test_upload_report to choice type as it is unequivocal
1 parent 1a748cb commit 473d29f

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/integration-unit-test.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
name: Integration and Unit Tests
22

33
on:
4+
workflow_dispatch:
5+
inputs:
6+
test_report_upload:
7+
description: 'Indicates whether to upload the test report to object storage. Defaults to "false"'
8+
type: choice
9+
required: false
10+
default: 'false'
11+
options:
12+
- 'true'
13+
- 'false'
414
push:
515
branches:
616
- 'main'
@@ -12,7 +22,6 @@ env:
1222
jobs:
1323
integration-and-unit-tests:
1424
runs-on: ubuntu-latest
15-
if: github.event_name == 'push' && (github.event.ref == 'refs/heads/main' || github.event.ref == 'refs/heads/dev')
1625
env:
1726
EXIT_STATUS: 0
1827
steps:
@@ -44,9 +53,9 @@ jobs:
4453
name: test-report-file
4554
path: "${{ env.REPORT_FILENAME }}"
4655

47-
4856
process-upload-report:
4957
runs-on: ubuntu-latest
58+
if: always() && github.repository == 'linode/packer-plugin-linode' && (github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.test_report_upload == 'true'))
5059
needs:
5160
- integration-and-unit-tests
5261
steps:

0 commit comments

Comments
 (0)