Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
name: Check
on: [ pull_request, push ]
on:
- push
# The "pull_request_target" event allows a pull request from an external fork to run the Workflow with Secrets.
# It can be vulnerable as a modified Workflow in a malicious pull request can run with Secrets.
# See: https://securitylab.github.com/resources/github-actions-preventing-pwn-requests/
#
# Confirm this repo is configured to "Require approval for all external contributors" in Settings of the repo,
# and inspect any external pull request before approving the Workflow to run for the external pull request.
- pull_request_target
jobs:
check:
runs-on: ${{ matrix.os }}
permissions: # The "pull_request_target" event also permits "write" by default, but it should be disabled.
contents: read
actions: read
# push: always run.
# pull_request: run only when the PR is submitted from a forked repository, not within this repository.
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
Expand All @@ -22,12 +33,11 @@ jobs:
with:
java-version: 8
distribution: "temurin"
cache: "gradle"
- name: Check
env:
GCP_EMAIL: ${{secrets.GCP_EMAIL}}
GCP_JSON_KEYFILE: ${{secrets.GCP_JSON_KEYFILE}}
GCP_PRIVATE_KEYFILE: ${{secrets.GCP_PRIVATE_KEYFILE}}
GCP_BUCKET: ${{secrets.GCP_BUCKET}}
GCP_BUCKET_DIRECTORY: ${{secrets.GCP_BUCKET_DIRECTORY}}
GCP_EMAIL: ${{ secrets.GCP_EMAIL }}
GCP_JSON_KEYFILE: ${{ secrets.GCP_JSON_KEYFILE }}
GCP_PRIVATE_KEYFILE: ${{ secrets.GCP_PRIVATE_KEYFILE }}
GCP_BUCKET: ${{ secrets.GCP_BUCKET }}
GCP_BUCKET_DIRECTORY: ${{ secrets.GCP_BUCKET_DIRECTORY }}
run: ./gradlew --stacktrace check