From bff5f3361624a72daa3e056b341e8833ff78427f Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Sun, 1 Jan 2023 04:09:10 -0500 Subject: [PATCH] Correct GITHUB_TOKEN handling --- .github/actions/build-dependencies/action.yml | 7 ++++++- .github/actions/test-dependencies/action.yml | 7 +++++++ .github/workflows/monero-tests.yaml | 3 +++ .github/workflows/tests.yml | 3 +++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/actions/build-dependencies/action.yml b/.github/actions/build-dependencies/action.yml index b67e4192..15db381e 100644 --- a/.github/actions/build-dependencies/action.yml +++ b/.github/actions/build-dependencies/action.yml @@ -2,6 +2,11 @@ name: build-dependencies description: Installs build dependencies for Serai inputs: + github-token: + description: "GitHub token to install Protobuf with" + require: true + default: + rust-toolchain: description: "Rust toolchain to install" required: false @@ -18,7 +23,7 @@ runs: - name: Install Protobuf uses: arduino/setup-protoc@v1 with: - repo-token: ${{ secrets.GITHUB_TOKEN }} + repo-token: ${{ inputs.github-token }} - name: Install solc shell: bash diff --git a/.github/actions/test-dependencies/action.yml b/.github/actions/test-dependencies/action.yml index 60dcc19c..9af81eef 100644 --- a/.github/actions/test-dependencies/action.yml +++ b/.github/actions/test-dependencies/action.yml @@ -2,6 +2,11 @@ name: test-dependencies description: Installs test dependencies for Serai inputs: + github-token: + description: "GitHub token to install Protobuf with" + require: true + default: + monero-version: description: "Monero version to download and run as a regtest node" required: false @@ -12,6 +17,8 @@ runs: steps: - name: Install Build Dependencies uses: ./.github/actions/build-dependencies + with: + github-token: ${{ inputs.github-token }} - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 diff --git a/.github/workflows/monero-tests.yaml b/.github/workflows/monero-tests.yaml index c26cd1ee..d5c66acc 100644 --- a/.github/workflows/monero-tests.yaml +++ b/.github/workflows/monero-tests.yaml @@ -20,6 +20,8 @@ jobs: - name: Test Dependencies uses: ./.github/actions/test-dependencies + with: + github-token: ${{ secrets.GITHUB_TOKEN }} - name: Run Unit Tests Without Features run: cargo test --package monero-serai --lib @@ -39,6 +41,7 @@ jobs: - name: Test Dependencies uses: ./.github/actions/test-dependencies with: + github-token: ${{ secrets.GITHUB_TOKEN }} monero-version: ${{ matrix.version }} - name: Run Integration Tests Without Features diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2d686d97..f0e4f57e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -20,6 +20,7 @@ jobs: - name: Build Dependencies uses: ./.github/actions/build-dependencies with: + github-token: ${{ secrets.GITHUB_TOKEN }} # Clippy requires nightly due to serai-runtime requiring it rust-toolchain: ${{ steps.nightly.outputs.version }} rust-components: clippy @@ -57,6 +58,8 @@ jobs: - name: Test Dependencies uses: ./.github/actions/test-dependencies + with: + github-token: ${{ secrets.GITHUB_TOKEN }} - name: Run Tests run: cargo test --all-features