name: "install gh" description: "Install the gh cli in a debian based distro and switches to the PR branch." inputs: pr-number: description: "Number of the PR" required: true GH_TOKEN: description: "GitHub token" required: true outputs: branch: description: "Branch name for the PR" value: ${{ steps.branch.outputs.branch }} runs: using: "composite" steps: - name: Set up git shell: bash # Here it would get the script from previous step run: git config --global --add safe.directory '*' - run: gh pr checkout ${{ inputs.pr-number }} shell: bash env: GITHUB_TOKEN: ${{ inputs.GH_TOKEN }} - name: Export branch name shell: bash run: echo "branch=$(git rev-parse --abbrev-ref HEAD)" >> "$GITHUB_OUTPUT" id: branch