Getting started with self-hosted runners for GitHub CI on ExCL systems.
svc.sh script to install and manage the runner service.issue_comment event is used to trigger the pipeline when a PR comment is made.- name: Verify actor
env:
ACTOR_TOKEN: ${{secrets.TOKENIZER}}${{github.actor}}${{secrets.TOKENIZER}}
SECRET_ACTORS: ${{secrets.CI_GPU_ACTORS}}
if: contains(env.SECRET_ACTORS, env.ACTOR_TOKEN)
id: check
run: |
echo "triggered=true" >> $GITHUB_OUTPUT- name: GitHub API Request
if: steps.check.outputs.triggered == 'true'
id: request
uses: octokit/[email protected]
with:
route: ${{github.event.issue.pull_request.url}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}- name: Create PR status
if: steps.check.outputs.triggered == 'true'
uses: geekdude/[email protected]
with:
authToken: ${{ secrets.GITHUB_TOKEN }}
context: "ci-gpu-AMD ${{ matrix.jobname }}"
state: "pending"
sha: ${{fromJson(steps.request.outputs.data).head.sha}}
target_url: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}- name: Report PR status
if: always() && steps.check.outputs.triggered == 'true'
uses: geekdude/[email protected]
with:
authToken: ${{ secrets.GITHUB_TOKEN }}
context: "ci-GPU-AMD ${{matrix.jobname}}"
state: ${{job.status}}
sha: ${{fromJson(steps.request.outputs.data).head.sha}}
target_url: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}mkdir -p /scratch/$USER/.config/systemd
ln -s /scratch/$USER/.config/systemd /home/$USER/.config/systemdcurl -o actions-runner-linux-x64-2.311.0.tar.gz -L https://github.com/actions/runner/releases/download/v2.311.0/actions-runner-linux-x64-2.311.0.tar.gz
tar xzf ./actions-runner-linux-x64-2.311.0.tar.gz./config.sh --url <url> --token <token>patch -p1 < /auto/software/github-runner/excl-patch.diffloginctl enable-linger./svc.sh install./svc.sh start
./svc.sh statussystemctl --user disable <service namesystemctl --user enable <service name>./svc.sh stop./svc.sh uninstallon:
issue_comment:
types: [created]