Skip to content

Commit 6e0901e

Browse files
committed
runner updated, may crash.
1 parent 6b2e8ba commit 6e0901e

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

.github/workflows/android-ci.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
- '**/README.md'
1313
- '.run/**'
1414

15+
env:
16+
JDK_URL: https://corretto.aws/downloads/latest/amazon-corretto-17-x64-linux-jdk.tar.gz
17+
JDK_FILE: ./amazon-corretto-17-x64-linux-jdk.tar.gz
18+
1519
jobs:
1620
build:
1721
name: 🎉 Build
@@ -23,33 +27,26 @@ jobs:
2327

2428
- name: Get latest Corretto URL
2529
id: get-latest-corretto-url
26-
run: >-
27-
echo "::set-output name=URL::$(curl -LIs -o /dev/null -w
28-
%{url_effective}
29-
https://corretto.aws/downloads/latest/amazon-corretto-17-x64-linux-jdk.tar.gz)"
30+
run: echo "{URL}={$(curl -LIs -o /dev/null -w %{url_effective} $JDK_URL)}" >> $GITHUB_OUTPUT
3031

3132
- uses: actions/cache@v3
3233
id: corretto-cache
3334
name: Restore Corretto
3435
with:
35-
path: ./amazon-corretto-17-x64-linux-jdk.tar.gz
36-
key: >-
37-
${{ runner.os }}-corretto-${{
38-
steps.get-latest-corretto-url.outputs.___URL }}
36+
path: $JDK_FILE
37+
key: ${{ runner.os }}-corretto-${{ steps.get-latest-corretto-url.outputs.___URL }}
3938

4039
- name: Download AWS Corretto
4140
if: steps.corretto-cache.outputs.cache-hit != 'true'
42-
run: >-
43-
wget
44-
https://corretto.aws/downloads/latest/amazon-corretto-17-x64-linux-jdk.tar.gz
41+
run: wget steps.get-latest-corretto-url.outputs.___URL
4542

4643
- name: ☕ Set up JDK 17
4744
uses: actions/setup-java@v3
4845
with:
4946
distribution: jdkfile
5047
java-version: '17'
5148
architecture: x64
52-
jdkFile: ./amazon-corretto-17-x64-linux-jdk.tar.gz
49+
jdkFile: $JDK_FILE
5350

5451
- name: 🔢 Grant execute permission for gradlew
5552
run: chmod +x gradlew

0 commit comments

Comments
 (0)