name: 'Clone Repositories' description: 'Clone self and upstream repositories' inputs: ecosystem-ci-project: description: 'The ecosystem ci project to clone' required: false default: '' runs: using: 'composite' steps: - name: Output ecosystem ci project hash shell: bash id: ecosystem-ci-project-hash if: ${{ inputs.ecosystem-ci-project != '' }} env: ECOSYSTEM_CI_PROJECT: ${{ inputs.ecosystem-ci-project }} run: | node -e "const fs = require('fs'); const data = JSON.parse(fs.readFileSync('./ecosystem-ci/repo.json', 'utf8')); const project = data[process.env.ECOSYSTEM_CI_PROJECT]; console.log('ECOSYSTEM_CI_PROJECT_HASH=' + project.hash);" >> "$GITHUB_OUTPUT" node -e "const fs = require('fs'); const data = JSON.parse(fs.readFileSync('./ecosystem-ci/repo.json', 'utf8')); const project = data[process.env.ECOSYSTEM_CI_PROJECT]; console.log('ECOSYSTEM_CI_PROJECT_REPOSITORY=' + project.repository.replace('https://github.com/', '').replace('.git', ''));" >> "$GITHUB_OUTPUT" - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 if: ${{ inputs.ecosystem-ci-project != '' }} with: persist-credentials: false repository: ${{ steps.ecosystem-ci-project-hash.outputs.ECOSYSTEM_CI_PROJECT_REPOSITORY }} path: ecosystem-ci/${{ inputs.ecosystem-ci-project }} ref: ${{ steps.ecosystem-ci-project-hash.outputs.ECOSYSTEM_CI_PROJECT_HASH }}