Skip to content

Commit dcf9b1f

Browse files
committed
[build] make artifact upload handling more generic
1 parent 1cfa0a0 commit dcf9b1f

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

.github/workflows/bazel.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,16 @@ on:
6161
required: false
6262
type: string
6363
default: ''
64-
artifact-name:
64+
upload-name:
6565
description: Name of artifact to upload
6666
required: false
6767
type: string
68-
default: 'ignore-artifacts'
68+
default: ''
69+
upload-path:
70+
description: path of artifact to upload
71+
required: false
72+
type: string
73+
default: ''
6974

7075
jobs:
7176
bazel:
@@ -171,14 +176,10 @@ jobs:
171176
title: "Nightly"
172177
prerelease: true
173178
files: ${{ inputs.nightly-release-files }}
174-
- name: Save changes
175-
if: ${{ always() && inputs.artifact-name != 'ignore-artifacts' }}
176-
run: |
177-
git diff > changes.patch
178-
- name: "Upload changes"
179-
if: ${{ always() && inputs.artifact-name != 'ignore-artifacts' }}
179+
- name: "Upload artifact"
180+
if: ${{ always() && inputs.upload-name != '' && inputs.upload-path != '' }}
180181
uses: actions/upload-artifact@v4
181182
with:
182-
name: ${{ inputs.artifact-name }}
183-
path: changes.patch
183+
name: ${{ inputs.upload-name }}
184+
path: ${{ inputs.upload-path }}
184185
retention-days: 6

.github/workflows/pin-browsers.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ jobs:
1111
with:
1212
name: Pin Browsers
1313
cache-key: pin-browsers
14-
run: bazel run //scripts:pinned_browsers
15-
artifact-name: pinned-browsers
14+
upload-name: pinned-browsers
15+
upload-path: changes.patch
16+
run: |
17+
bazel run //scripts:pinned_browsers
18+
git diff > changes.patch
1619
1720
pull-request:
1821
if: github.repository_owner == 'seleniumhq'

0 commit comments

Comments
 (0)