-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgithub-actions-runglass-receipt.yml
More file actions
40 lines (33 loc) · 1.13 KB
/
github-actions-runglass-receipt.yml
File metadata and controls
40 lines (33 loc) · 1.13 KB
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
name: RunGlass PR Receipt
on:
pull_request:
workflow_dispatch:
permissions:
contents: read
issues: write
pull-requests: write
jobs:
receipt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install RunGlass
run: cargo install runglass --locked
- name: Run command with RunGlass
run: |
runglass ci --provider github --output runglass-receipt -- \
npm test
- name: Upload RunGlass receipt
if: always()
uses: actions/upload-artifact@v4
with:
name: runglass-receipt
path: runglass-receipt/
- name: Comment RunGlass receipt on PR
if: always() && github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork && hashFiles('runglass-receipt/receipt.json') != ''
run: |
if ! runglass github comment --receipt runglass-receipt/receipt.json --auto; then
echo "::warning::RunGlass could not post a PR comment. The receipt artifact was uploaded; check workflow token permissions."
fi
env:
GITHUB_TOKEN: ${{ github.token }}