-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (42 loc) · 1.47 KB
/
comment-pull-req.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
name: Create Comments for Pull Request
on:
pull_request:
branches:
- master
jobs:
get_latest_commit_message:
name: Get Latest Commit Message
runs-on: ubuntu-18.04
outputs:
commit_message: ${{ steps.get_commit_message.outputs.COMMIT_MESSAGE }}
steps:
- name: Checkout current branch
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Get commit message
id: get_commit_message
run: echo "::set-output name=COMMIT_MESSAGE::$(git log --format=%B -n 1 ${{ github.event.after }})"
- name: Echo latest commit message
env:
COMMIT_MESSAGE: ${{ steps.get_commit_message.outputs.COMMIT_MESSAGE }}
run: |
echo "Message for latest commit: $COMMIT_MESSAGE"
model_performance:
name: Comment Model Performance
runs-on: ubuntu-18.04
container: docker://ryzalk/dvc-for-cd4ml:latest
needs: get_latest_commit_message
steps:
- uses: actions/checkout@v2
- name: Post comment with model experiment info
if: contains(needs.get_latest_commit_message.outputs.commit_message, 'comment-model-exp') == true
env:
AZ_CONN_STRING: ${{ secrets.AZ_CONN_STRING }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
source activate dvc-for-cd4ml
dvc remote modify --local azremote connection_string "$AZ_CONN_STRING"
dvc pull train-run-metrics.md
cml-send-comment train-run-metrics.md