Skip to content

Commit 281f892

Browse files
chore: Refactor Github Action per b/485167538 (#32760)
Co-authored-by: Ben Knutson <benknutson@google.com>
1 parent b47a69d commit 281f892

7 files changed

Lines changed: 29 additions & 9 deletions

File tree

.github/workflows/bump-version.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ jobs:
3131
- name: execute
3232
run: |
3333
toys bump-version -v --fork \
34-
--version "${{ github.event.inputs.version }}" \
35-
${{ github.event.inputs.args }} -- \
36-
${{ github.event.inputs.gems }}
34+
--version "${GITHUB_EVENT_INPUTS_VERSION}" \
35+
${GITHUB_EVENT_INPUTS_ARGS} -- \
36+
${GITHUB_EVENT_INPUTS_GEMS}
37+
env:
38+
GITHUB_EVENT_INPUTS_VERSION: ${{ github.event.inputs.version }}
39+
GITHUB_EVENT_INPUTS_ARGS: ${{ github.event.inputs.args }}
40+
GITHUB_EVENT_INPUTS_GEMS: ${{ github.event.inputs.gems }}

.github/workflows/delete-library.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,7 @@ jobs:
2828
gem install --no-document toys
2929
- name: Delete-library
3030
run: |
31-
toys delete-library -v --fork ${{ github.event.inputs.flags }} ${{ github.event.inputs.gem }}
31+
toys delete-library -v --fork ${GITHUB_EVENT_INPUTS_FLAGS} ${GITHUB_EVENT_INPUTS_GEM}
32+
env:
33+
GITHUB_EVENT_INPUTS_FLAGS: ${{ github.event.inputs.flags }}
34+
GITHUB_EVENT_INPUTS_GEM: ${{ github.event.inputs.gem }}

.github/workflows/new-library.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,6 @@ jobs:
4343
gem install --no-document toys
4444
- name: Create library
4545
run: |
46-
toys new-library -v --bazelisk --pull --pull-googleapis --test --fork --bootstrap-releases ${{ github.event.inputs.protoPath }}
46+
toys new-library -v --bazelisk --pull --pull-googleapis --test --fork --bootstrap-releases ${GITHUB_EVENT_INPUTS_PROTOPATH}
47+
env:
48+
GITHUB_EVENT_INPUTS_PROTOPATH: ${{ github.event.inputs.protoPath }}

.github/workflows/owlbot.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,7 @@ jobs:
3030
gem install --no-document toys
3131
- name: OwlBot
3232
run: |
33-
toys owlbot -v --pull --fork --pull-googleapis --bazelisk ${{ github.event.inputs.flags }} ${{ github.event.inputs.gems }}
33+
toys owlbot -v --pull --fork --pull-googleapis --bazelisk ${GITHUB_EVENT_INPUTS_FLAGS} ${GITHUB_EVENT_INPUTS_GEMS}
34+
env:
35+
GITHUB_EVENT_INPUTS_FLAGS: ${{ github.event.inputs.flags }}
36+
GITHUB_EVENT_INPUTS_GEMS: ${{ github.event.inputs.gems }}

.github/workflows/release-please-now.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,6 @@ jobs:
3333
run: |
3434
toys release label-please -v \
3535
--github-event-name=${{ github.event_name }} \
36-
${{ github.event.inputs.args }}
36+
${GITHUB_EVENT_INPUTS_ARGS}
37+
env:
38+
GITHUB_EVENT_INPUTS_ARGS: ${{ github.event.inputs.args }}

.github/workflows/tombstone-library.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,7 @@ jobs:
2828
gem install --no-document toys
2929
- name: Tombstone-library
3030
run: |
31-
toys tombstone-library -v --fork ${{ github.event.inputs.flags }} ${{ github.event.inputs.gem }}
31+
toys tombstone-library -v --fork ${GITHUB_EVENT_INPUTS_FLAGS} ${GITHUB_EVENT_INPUTS_GEM}
32+
env:
33+
GITHUB_EVENT_INPUTS_FLAGS: ${{ github.event.inputs.flags }}
34+
GITHUB_EVENT_INPUTS_GEM: ${{ github.event.inputs.gem }}

.github/workflows/update-pr.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,7 @@ jobs:
3232
gem install --no-document toys
3333
- name: Update PR
3434
run: |
35-
toys update-pr -v ${{ github.event.inputs.options }} ${{ github.event.inputs.pr }}
35+
toys update-pr -v ${GITHUB_EVENT_INPUTS_OPTIONS} ${GITHUB_EVENT_INPUTS_PR}
36+
env:
37+
GITHUB_EVENT_INPUTS_OPTIONS: ${{ github.event.inputs.options }}
38+
GITHUB_EVENT_INPUTS_PR: ${{ github.event.inputs.pr }}

0 commit comments

Comments
 (0)