diff --git a/.github/workflows/actions/checkout/action.yml b/.github/workflows/actions/checkout/action.yml deleted file mode 100644 index 8955bd4..0000000 --- a/.github/workflows/actions/checkout/action.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: checkout -description: "Checks out repo with optional token" -inputs: - token: - description: "Access token for private repos" - required: false - -runs: - using: "composite" - steps: - - uses: actions/checkout@v3 - if: "${{ inputs.token != null }}" - with: - token: ${{ secrets.CI_READ }} - submodules: recursive - - uses: actions/checkout@v3 - if: "${{ inputs.token == null }}" - with: - submodules: recursive diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2d7827e..be292b3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,9 +59,19 @@ jobs: if: needs.skip-duplicates.outputs.should_skip != 'true' runs-on: ubuntu-latest steps: - - uses: ./.github/workflows/actions/checkout + - uses: actions/checkout@v3 + env: + ci_read: ${{ secrets.CI_READ }} + if: ${{ env.ci_read != '' }} with: - token: ${{ secrets.CI_READ }} + token: ${{ env.ci_read }} + submodules: recursive + - uses: actions/checkout@v3 + env: + ci_read: ${{ secrets.CI_READ }} + if: ${{ env.ci_read == '' }} + with: + submodules: recursive - uses: ./.github/workflows/actions/rust-toolchain with: token: ${{ secrets.CI_READ }} @@ -72,9 +82,19 @@ jobs: if: needs.skip-duplicates.outputs.should_skip != 'true' runs-on: ubuntu-latest steps: - - uses: ./.github/workflows/actions/checkout + - uses: actions/checkout@v3 + env: + ci_read: ${{ secrets.CI_READ }} + if: ${{ env.ci_read != '' }} with: - token: ${{ secrets.CI_READ }} + token: ${{ env.ci_read }} + submodules: recursive + - uses: actions/checkout@v3 + env: + ci_read: ${{ secrets.CI_READ }} + if: ${{ env.ci_read == '' }} + with: + submodules: recursive - uses: ./.github/workflows/actions/rust-toolchain with: token: ${{ secrets.CI_READ }} @@ -88,9 +108,18 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: ./.github/workflows/actions/checkout + env: + ci_read: ${{ secrets.CI_READ }} + if: ${{ env.ci_read != '' }} with: - token: ${{ secrets.CI_READ }} + token: ${{ env.ci_read }} + submodules: recursive + - uses: actions/checkout@v3 + env: + ci_read: ${{ secrets.CI_READ }} + if: ${{ env.ci_read == '' }} + with: + submodules: recursive - uses: ./.github/workflows/actions/rust-toolchain with: token: ${{ secrets.CI_READ }} @@ -103,9 +132,18 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: ./.github/workflows/actions/checkout + env: + ci_read: ${{ secrets.CI_READ }} + if: ${{ env.ci_read != '' }} with: - token: ${{ secrets.CI_READ }} + token: ${{ env.ci_read }} + submodules: recursive + - uses: actions/checkout@v3 + env: + ci_read: ${{ secrets.CI_READ }} + if: ${{ env.ci_read == '' }} + with: + submodules: recursive - uses: ./.github/workflows/actions/rust-toolchain with: token: ${{ secrets.CI_READ }}