diff --git a/.github/scripts/run_cpp_linter.py b/.github/scripts/run_cpp_linter.py index 17c05381cf..0338a9f2bc 100644 --- a/.github/scripts/run_cpp_linter.py +++ b/.github/scripts/run_cpp_linter.py @@ -6,7 +6,7 @@ token = os.environ['GITHUB_TOKEN'] gh = Github(token) -event_file_path = os.environ['GITHUB_EVENT_PATH'] +event_file_path = "/GITHUB_EVENT.json" with open(event_file_path, 'r') as f: j = f.read() event = json.load(j) diff --git a/.github/scripts/run_py_linter.py b/.github/scripts/run_py_linter.py index 14e768ceff..5a78a661e6 100644 --- a/.github/scripts/run_py_linter.py +++ b/.github/scripts/run_py_linter.py @@ -6,7 +6,7 @@ token = os.environ['GITHUB_TOKEN'] gh = Github(token) -event_file_path = os.environ['GITHUB_EVENT_PATH'] +event_file_path = "/GITHUB_EVENT.json" with open(event_file_path, 'r') as f: j = f.read() event = json.load(j) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 281a77eb80..60d598b986 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -10,6 +10,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} - name: Docker Login run: docker login docker.pkg.github.com -u $GITHUB_ACTOR -p $GITHUB_TOKEN env: @@ -31,6 +33,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} - name: Docker Login run: docker login docker.pkg.github.com -u $GITHUB_ACTOR -p $GITHUB_TOKEN env: