-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (74 loc) · 2.06 KB
/
check-ci.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: CI
on:
pull_request: { }
release:
types:
- published
push:
branches:
- main
jobs:
build:
name: Run CI Steps
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
env:
LC_ALL: C.UTF-8
LANG: C.UTF-8
CI: true
CIRCLE_ARTIFACTS: /tmp/ci/artifacts
CIRCLE_TEST_REPORTS: /tmp/ci/junit
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: ./.github/custom-actions/setup-gradle
- name: build
run: ./gradlew --parallel --stacktrace --continue check
- name: Report gradle cache size
run: du -hs ~/.gradle/caches
- name: Upload test reports
uses: actions/upload-artifact@v3
if: always()
with:
path: /tmp/ci/artifacts
retention-days: 5
publish:
name: Publish
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
env:
LC_ALL: C.UTF-8
LANG: C.UTF-8
CI: true
CIRCLE_ARTIFACTS: /tmp/ci/artifacts
CIRCLE_TEST_REPORTS: /tmp/ci/junit
KUBECONFIG: /tmp/.kube/config
needs: build
if: startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: ./.github/custom-actions/setup-gradle
- name: Publish
run: |
./gradlew --parallel publishPlugins \
-Pgradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }} \
-Pgradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }}
- name: PagerDuty Alert
uses: theoremlp/pagerduty-alert@v1
if: ${{ failure() }}
with:
pd-integration-key: ${{ secrets.PD_GHA_GLOBAL_INTEGRATION_KEY }}
title: check-ci failed for ${{ github.repository }}
summary: |
CI checks or deployment failed on `main` for ${{ github.repository }}.
service: clip-business-hours
severity: warning