Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
luisgarciaxygeni authored Mar 4, 2024
1 parent 90f293c commit 0961663
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,26 @@ jobs:
prt_build_and_upload:
runs-on: ubuntu-latest
steps:

- name: Checking out PR code
uses: actions/checkout@v4
if: ${{ github.event_name == 'pull_request_target' }}
with:
# Number of commits to fetch. 0 indicates all history for all branches and tags.
# Default: 1
fetch-depth: '0'
# This is to get the PR code instead of the repo code
ref: ${{ github.event.pull_request.head.sha }}

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
name: Checking out main code
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
with:
# Number of commits to fetch. 0 indicates all history for all branches and tags.
# Default: 1
fetch-depth: '0'

- name: Building ...
run: |
java -version
Expand Down

0 comments on commit 0961663

Please sign in to comment.