forked from childmindresearch/slurm_testing
-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (57 loc) · 1.82 KB
/
post_comment.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Post regtest results comment
on:
workflow_dispatch:
inputs:
environment:
type: environment
OWNER:
description: Owner of repository to comment on
type: string
required: false
REPO:
description: Repository to comment on
type: string
default: C-PAC
required: false
SHA:
description: SHA of commit to comment on
type: string
required: true
jobs:
post_to_commit:
name: Post results comment to GitHub
environment: ACCESS
env:
OWNER: ${{ inputs.OWNER || github.repository_owner }}
PLAYWRIGHT_BROWSERS_PATH: ${{ secrets.PLAYWRIGHT_BROWSERS_PATH }}
REPO: ${{ inputs.REPO }}
SHA: ${{ inputs.SHA }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
SSH_HOST: ${{ secrets.SSH_HOST }}
SSH_USER: ${{ secrets.SSH_USER }}
SSH_WORK_DIR: ${{ secrets.SSH_WORK_DIR }}
TOKEN_FILE: ${{ secrets.TOKEN_FILE }}
runs-on: ubuntu-latest
steps:
- name: Post comment from HPC
uses: appleboy/[email protected]
with:
host: ${{ env.SSH_HOST }}
username: ${{ env.SSH_USER }}
key: ${{ env.SSH_PRIVATE_KEY }}
command_timeout: 200m
script: |
export TOKEN_FILE=${{ env.TOKEN_FILE }}
if [ -n "${TOKEN_FILE}" ]
then
source ${TOKEN_FILE}
fi
export OWNER=${{ env.OWNER }}
export PLAYWRIGHT_BROWSERS_PATH=${{ env.PLAYWRIGHT_BROWSERS_PATH }}
export REPO=${{ env.REPO }}
export SHA=${{ env.SHA }}
export TESTING_OWNER=${{ github.repository_owner }}
cpac_regsuite_generate_comment ${{ env.SSH_WORK_DIR }}/lite/${{ env.SHA }}/correlations
- name: Cleanup SSH
run: |
rm -rf ~/.ssh