Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DONT-MERGE] Testing codeql execution from a PR #339

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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
35 changes: 33 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,42 @@ jobs:
path: rskj
fetch-depth: 0

- name: Determine branch to checkout for PR
if: github.event_name == 'pull_request'
working-directory: rskj
env:
PR_BRANCH: ${{ github.head_ref }}
run: |
IS_RSKJ_BRANCH=$(git ls-remote --heads origin "$PR_BRANCH")
if test -n "${IS_RSKJ_BRANCH}"; then
echo "Found matching branch name in RSKj repo"
CHECKOUT_REF="$PR_BRANCH"
else
echo "Using master for RSKj"
CHECKOUT_REF="master"
fi
echo "CHECKOUT_REF=$CHECKOUT_REF" >> $GITHUB_ENV

- name: Determine branch to checkout for push
if: github.event_name != 'pull_request'
working-directory: rskj
env:
POW_REF: ${{ github.ref_name }}
run: |
IS_RSKJ_REF=$(git ls-remote --heads origin "$POW_REF")
if test -n "${IS_RSKJ_REF}"; then
echo "Found matching ref in RSKj"
CHECKOUT_REF="$POW_REF"
else
echo "Using master for RSKj"
CHECKOUT_REF="master"
fi
echo "CHECKOUT_REF=$CHECKOUT_REF" >> $GITHUB_ENV

- name: Check out appropriate rskj reference
if: ${{ matrix.language == 'java' }}
working-directory: rskj
env:
CHECKOUT_REF: ${{ github.ref_name }}
CHECKOUT_REF: ${{ env.CHECKOUT_REF }}
run: |
git switch "$CHECKOUT_REF"

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
...
# Welcome to RskJ Powpeg Node

[![Build and test](https://github.com/rsksmart/powpeg-node/actions/workflows/build_and_test.yml/badge.svg)](https://github.com/rsksmart/powpeg-node/actions/workflows/build_and_test.yml)
Expand Down