forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (40 loc) · 1.73 KB
/
develocity-publish-build-scans.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
name: Develocity - Publish Maven Build Scans
on:
workflow_run:
workflows: [ "Quarkus CI" ]
types: [ completed ]
defaults:
run:
shell: bash
jobs:
publish-build-scans:
if: github.repository == 'quarkusio/quarkus' && github.event.workflow_run.event == 'pull_request'
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Extract preapproved developers list
id: extract-preapproved-developers
run: |
echo "preapproved-developpers<<EOF" >> $GITHUB_OUTPUT
cat .github/develocity-preapproved-developers.json >> $GITHUB_OUTPUT
echo >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Publish Maven Build Scans
uses: gradle/github-actions/maven-build-scan/publish@v1-beta
if: ${{ contains(fromJson(steps.extract-preapproved-developers.outputs.preapproved-developpers).preapproved-developers, github.event.workflow_run.actor.login) }}
with:
develocity-url: 'https://ge.quarkus.io'
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
skip-comment: true
- name: Push to summary
if: ${{ contains(fromJson(steps.extract-preapproved-developers.outputs.preapproved-developpers).preapproved-developers, github.event.workflow_run.actor.login) }}
run: |
echo -n "Pull request: " >> ${GITHUB_STEP_SUMMARY}
cat pr-number.out >> ${GITHUB_STEP_SUMMARY}
echo >> ${GITHUB_STEP_SUMMARY}
echo >> ${GITHUB_STEP_SUMMARY}
echo "| Job | Status | Build scan |" >> ${GITHUB_STEP_SUMMARY}
echo "|---|---|---|" >> ${GITHUB_STEP_SUMMARY}
cat publication.out >> ${GITHUB_STEP_SUMMARY}