-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (59 loc) · 1.74 KB
/
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
name: CI
on:
pull_request:
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
check:
name: Use this action for check
strategy:
matrix:
runner: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false
permissions:
contents: read # for checkout, and this action requires
runs-on: ${{ matrix.runner }}
timeout-minutes: 30
steps:
- name: Check out
uses: actions/checkout@v4
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Use this action
id: report
uses: ./
with:
modules: 'app'
configuration: 'releaseRuntimeClasspath'
project-dir: 'tmp'
script: |
# use public Android project
if [ -z "$(ls "$WORK_DIR/deps")" ]; then
sha='8d000f6c72bc5384b4ca9f7452d620085919519d'
head_sha="$sha"
else
sha='13144ae9b1cb7a725dc846179cd8498058bafad2'
base_sha="$sha"
fi
GH_REPO='android/sunflower'
gh repo clone "$GH_REPO" tmp -- --depth 1 --no-checkout
cd tmp
git fetch -q --depth 1 origin "$sha"
git checkout -q FETCH_HEAD
- name: Show result
if: always()
shell: bash # for windlows
run: |
{
echo '### outputs'
echo '- exists-diff: `${{ steps.report.outputs.exists-diff }}`'
} >> "$GITHUB_STEP_SUMMARY"