-
Notifications
You must be signed in to change notification settings - Fork 16
46 lines (41 loc) · 1.48 KB
/
comment.yml
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
name: Comment PR results
# only run one instance at a time
concurrency: bot-mutex
on:
schedule:
- cron: '0/10 * * * *'
workflow_dispatch: {}
jobs:
comment:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Add git branch for earthly
run: |
branch=""
if [ -n "$GITHUB_HEAD_REF" ]; then
branch="$GITHUB_HEAD_REF"
else
branch="${GITHUB_REF##*/}"
fi
git checkout -b "$branch" || true
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Install earthly
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.5.23/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"
# Ensure artifact script environment for the current commit is built. Most of the time this should
# just pull from the cache.
- name: Build script environment
run: earthly --use-inline-cache --strict +deps-full
- name: Run PR comment script
run: |
docker run \
-e GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} \
-v $PWD/scripts:/build/scripts \
-v $HOME/.config/hub:/home/checker/.config/hub \
checker/deps-full:latest \
poetry run python scripts/comment-prs.py