Skip to content

Commit 8b6912d

Browse files
Refactor Github Action per b/485167538
1 parent b21d6be commit 8b6912d

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

.github/workflows/forked_pr_workflow_check.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,6 @@ jobs:
2424
steps:
2525
- run: >
2626
${{ github.event.pull_request.head.repo.full_name == 'protocolbuffers/protobuf' }} ||
27-
(echo "This pull request is from an unsafe fork (${{ github.event.pull_request.head.repo.full_name }}) and isn't allowed to modify workflow files!" && exit 1)
27+
(echo "This pull request is from an unsafe fork (${GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME}) and isn't allowed to modify workflow files!" && exit 1)
28+
env:
29+
GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME: ${{ github.event.pull_request.head.repo.full_name }}

.github/workflows/test_java.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,10 @@ jobs:
6363
architecture: linux-x86_64
6464
- name: Move protoc into place and clean up
6565
run: |
66-
mv ${{ steps.build-protoc.outputs.protoc }} protoc
66+
mv ${STEPS_BUILD_PROTOC_OUTPUTS_PROTOC} protoc
6767
sudo rm -rf _build
68+
env:
69+
STEPS_BUILD_PROTOC_OUTPUTS_PROTOC: ${{ steps.build-protoc.outputs.protoc }}
6870
- name: Install snapshot version locally
6971
run: |
7072
cd java
@@ -91,8 +93,10 @@ jobs:
9193
architecture: linux-x86_64
9294
- name: Move protoc into place and clean up
9395
run: |
94-
mv ${{ steps.build-protoc.outputs.protoc }} protoc
96+
mv ${STEPS_BUILD_PROTOC_OUTPUTS_PROTOC} protoc
9597
sudo rm -rf _build
98+
env:
99+
STEPS_BUILD_PROTOC_OUTPUTS_PROTOC: ${{ steps.build-protoc.outputs.protoc }}
96100
- name: Install snapshot version locally (not using generated pom.xml)
97101
run: |
98102
mvn -e -B -Dhttps.protocols=TLSv1.2 install -Dmaven.test.skip=true

.github/workflows/update_php_repo.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
- name: Push Changes
4444
run: |
4545
git add --all
46-
git commit --allow-empty -m "${{ env.VERSION }} sync"
46+
git commit --allow-empty -m "${VERSION} sync"
4747
git push --force origin master
48-
git tag -a ${{ env.VERSION_TAG }} -m "Tag release ${{ env.VERSION_TAG }}"
49-
git push origin ${{ env.VERSION_TAG }}
48+
git tag -a ${VERSION_TAG} -m "Tag release ${VERSION_TAG}"
49+
git push origin ${VERSION_TAG}

0 commit comments

Comments
 (0)