From 5162b9e19efcaa5a2137f71a94f6f9e7f7d14da0 Mon Sep 17 00:00:00 2001 From: Valentin Khramtsov Date: Thu, 27 Mar 2025 16:52:00 +0300 Subject: [PATCH 1/2] fix: prepared lint workflow for external contributors --- .github/workflows/ci-test.yaml | 19 +++++++++++++++++++ .../workflows/tests-and-lints-template.yaml | 11 +++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/ci-test.yaml diff --git a/.github/workflows/ci-test.yaml b/.github/workflows/ci-test.yaml new file mode 100644 index 0000000..8c45407 --- /dev/null +++ b/.github/workflows/ci-test.yaml @@ -0,0 +1,19 @@ +name: Continuous Integration + +on: + push: + branches: + - fix/git-checkout-stage-fix + +permissions: + id-token: write + contents: read + +jobs: + tests-and-lints: + uses: ./.github/workflows/tests-and-lints-template.yaml + secrets: + eth_rpc_url: ${{ secrets.ETH_RPC_URL }} + app_id: ${{ secrets.APP_ID }} + app_private_key: ${{ secrets.APP_PRIVATE_KEY }} + diff --git a/.github/workflows/tests-and-lints-template.yaml b/.github/workflows/tests-and-lints-template.yaml index 947695d..6c10017 100644 --- a/.github/workflows/tests-and-lints-template.yaml +++ b/.github/workflows/tests-and-lints-template.yaml @@ -89,10 +89,17 @@ jobs: - name: Install git run: sudo apt update && sudo apt install -y git - - name: Checkout + - name: Checkout PR (from fork or branch) + if: github.event_name == 'pull_request' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: - ref: ${{ github.event_name == 'pull_request' && format('refs/pull/{0}/head', github.event.pull_request.number) || github.ref }} + ref: refs/pull/${{ github.event.pull_request.number }}/head + + - name: Checkout push branch (main or other) + if: github.event_name != 'pull_request' + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + with: + ref: ${{ github.ref }} - name: Setup git to use https run: | From 9896f4882940517d61852300420c7c580138406f Mon Sep 17 00:00:00 2001 From: Valentin Khramtsov Date: Thu, 27 Mar 2025 16:53:29 +0300 Subject: [PATCH 2/2] fix: prepared lint workflow for external contributors --- .github/workflows/ci-test.yaml | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 .github/workflows/ci-test.yaml diff --git a/.github/workflows/ci-test.yaml b/.github/workflows/ci-test.yaml deleted file mode 100644 index 8c45407..0000000 --- a/.github/workflows/ci-test.yaml +++ /dev/null @@ -1,19 +0,0 @@ -name: Continuous Integration - -on: - push: - branches: - - fix/git-checkout-stage-fix - -permissions: - id-token: write - contents: read - -jobs: - tests-and-lints: - uses: ./.github/workflows/tests-and-lints-template.yaml - secrets: - eth_rpc_url: ${{ secrets.ETH_RPC_URL }} - app_id: ${{ secrets.APP_ID }} - app_private_key: ${{ secrets.APP_PRIVATE_KEY }} -