Skip to content

Commit

Permalink
Cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
Goooler committed Jan 22, 2025
1 parent 48907ff commit 8bf9b83
Show file tree
Hide file tree
Showing 18 changed files with 26 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/jdk10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
- 'Casks/zulu-jdk10.rb'

jobs:
# This step is necessary for using `./github/workflows/*.yml` on the current branch, and it could be run on `ubuntu-latest`.
checkout:
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/jdk11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
- 'Casks/zulu-jdk11.rb'

jobs:
# This step is necessary for using `./github/workflows/*.yml` on the current branch, and it could be run on `ubuntu-latest`.
checkout:
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/jdk12.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
- 'Casks/zulu-jdk12.rb'

jobs:
# This step is necessary for using `./github/workflows/*.yml` on the current branch, and it could be run on `ubuntu-latest`.
checkout:
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/jdk13.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
- 'Casks/zulu-jdk13.rb'

jobs:
# This step is necessary for using `./github/workflows/*.yml` on the current branch, and it could be run on `ubuntu-latest`.
checkout:
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/jdk14.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
- 'Casks/zulu-jdk14.rb'

jobs:
# This step is necessary for using `./github/workflows/*.yml` on the current branch, and it could be run on `ubuntu-latest`.
checkout:
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/jdk15.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
- 'Casks/zulu-jdk15.rb'

jobs:
# This step is necessary for using `./github/workflows/*.yml` on the current branch, and it could be run on `ubuntu-latest`.
checkout:
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/jdk16.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
- 'Casks/zulu-jdk16.rb'

jobs:
# This step is necessary for using `./github/workflows/*.yml` on the current branch, and it could be run on `ubuntu-latest`.
checkout:
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/jdk17.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
- 'Casks/zulu-jdk17.rb'

jobs:
# This step is necessary for using `./github/workflows/*.yml` on the current branch, and it could be run on `ubuntu-latest`.
checkout:
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/jdk18.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
- 'Casks/zulu-jdk18.rb'

jobs:
# This step is necessary for using `./github/workflows/*.yml` on the current branch, and it could be run on `ubuntu-latest`.
checkout:
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/jdk19.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
- 'Casks/zulu-jdk19.rb'

jobs:
# This step is necessary for using `./github/workflows/*.yml` on the current branch, and it could be run on `ubuntu-latest`.
checkout:
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/jdk20.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
- 'Casks/zulu-jdk20.rb'

jobs:
# This step is necessary for using `./github/workflows/*.yml` on the current branch, and it could be run on `ubuntu-latest`.
checkout:
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/jdk21.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
- 'Casks/zulu-jdk21.rb'

jobs:
# This step is necessary for using `./github/workflows/*.yml` on the current branch, and it could be run on `ubuntu-latest`.
checkout:
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/jdk22.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
- 'Casks/zulu-jdk22.rb'

jobs:
# This step is necessary for using `./github/workflows/*.yml` on the current branch, and it could be run on `ubuntu-latest`.
checkout:
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/jdk23.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
- 'Casks/zulu-jdk23.rb'

jobs:
# This step is necessary for using `./github/workflows/*.yml` on the current branch, and it could be run on `ubuntu-latest`.
checkout:
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/jdk7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
- 'Casks/zulu-jdk7.rb'

jobs:
# This step is necessary for using `./github/workflows/*.yml` on the current branch, and it could be run on `ubuntu-latest`.
checkout:
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/jdk8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
- 'Casks/zulu-jdk8.rb'

jobs:
# This step is necessary for using `./github/workflows/*.yml` on the current branch, and it could be run on `ubuntu-latest`.
checkout:
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/jdk9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
- 'Casks/zulu-jdk9.rb'

jobs:
# This step is necessary for using `./github/workflows/*.yml` on the current branch, and it could be run on `ubuntu-latest`.
checkout:
runs-on: ubuntu-latest
steps:
Expand Down
13 changes: 9 additions & 4 deletions updater/src/main/java/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ public static void main(String... args) throws IOException {
}

var workflowFile = workflowsDir.resolve("jdk" + jdkVersion + ".yml");
var workflow = WORKFLOW_TEMPLATE.replace("{VERSION}", String.valueOf(jdkVersion));
var workflow =
WORKFLOW_TEMPLATE
.replace("{VERSION}", String.valueOf(jdkVersion))
.replace("{REUSABLE_WORKFLOW}", REUSABLE_WORKFLOW);
Files.writeString(workflowFile, workflow);
}

Expand Down Expand Up @@ -216,6 +219,7 @@ default Package getPackageDetails(int version, String architecture) throws IOExc

private static final int MINIMUM_JDK_VERSION = 7;
private static final String VERSION_HEADER = "## Versions\n\n";
private static final String REUSABLE_WORKFLOW = ".github/workflows/reusable-cask-checks.yml";
private static final String WORKFLOW_TEMPLATE =
"""
name: JDK{VERSION}
Expand All @@ -225,24 +229,25 @@ default Package getPackageDetails(int version, String architecture) throws IOExc
branches:
- master
paths:
- '.github/workflows/reusable-cask-checks.yml'
- '{REUSABLE_WORKFLOW}'
- 'Casks/zulu-jdk{VERSION}.rb'
pull_request:
branches:
- master
paths:
- '.github/workflows/reusable-cask-checks.yml'
- '{REUSABLE_WORKFLOW}'
- 'Casks/zulu-jdk{VERSION}.rb'
jobs:
# This step is necessary for using `./github/workflows/*.yml` on the current branch, and it could be run on `ubuntu-latest`.
checkout:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
check:
needs: checkout
uses: ./.github/workflows/reusable-cask-checks.yml
uses: ./{REUSABLE_WORKFLOW}
with:
jdk-version: {VERSION}
""";
Expand Down

0 comments on commit 8bf9b83

Please sign in to comment.