name: R generate configure on: workflow_dispatch: inputs: pr-branch: type: string description: | Branch in lightgbm-org/LightGBM to update. # automatically cancel in-progress builds if another commit is pushed concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true # default to 0 permissions # (job-level overrides add the minimal permissions needed) permissions: contents: none jobs: r-configure: name: r-configure timeout-minutes: 60 runs-on: ubuntu-latest container: "ubuntu:22.04" permissions: contents: write id-token: write pull-requests: read steps: - name: Install essential software before checkout run: | apt-get update apt-get install --no-install-recommends -y \ ca-certificates \ git - name: Trust git cloning LightGBM run: | git config --global --add safe.directory "${GITHUB_WORKSPACE}" - name: Checkout repository uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: fetch-depth: 5 submodules: false repository: lightgbm-org/LightGBM ref: "refs/heads/${{ inputs.pr-branch }}" token: ${{ github.token }} persist-credentials: true - name: Update configure shell: bash run: ./R-package/recreate-configure.sh || exit 1 - name: Push changes run: | # source for this user and email: https://github.com/orgs/community/discussions/160496 git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot]@users.noreply.github.com" git add "./R-package/configure" git commit --allow-empty -m "Auto-update configure" git push