Skip to content

Commit 7278fda

Browse files
authored
Add Java JDK setup step to workflow
1 parent b5da054 commit 7278fda

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

.github/workflows/static.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,47 @@ jobs:
6060
lookup-only: # optional, default is false
6161
# Run the post step to save the cache even if another step before fails
6262
save-always: # optional, default is false
63+
- name: Setup Java JDK
64+
uses: actions/setup-java@v5.2.0
65+
with:
66+
# The Java version to set up. Takes a whole or semver Java version. See examples of supported syntax in README file
67+
java-version: # optional
68+
# The path to the `.java-version` file. See examples of supported syntax in README file
69+
java-version-file: # optional
70+
# Java distribution. See the list of supported distributions in README file
71+
distribution:
72+
# The package type (jdk, jre, jdk+fx, jre+fx)
73+
java-package: # optional, default is jdk
74+
# The architecture of the package (defaults to the action runner's architecture)
75+
architecture: # optional
76+
# Path to where the compressed JDK is located
77+
jdkFile: # optional
78+
# Set this option if you want the action to check for the latest available version that satisfies the version spec
79+
check-latest: # optional
80+
# ID of the distributionManagement repository in the pom.xml file. Default is `github`
81+
server-id: # optional, default is github
82+
# Environment variable name for the username for authentication to the Apache Maven repository. Default is $GITHUB_ACTOR
83+
server-username: # optional, default is GITHUB_ACTOR
84+
# Environment variable name for password or token for authentication to the Apache Maven repository. Default is $GITHUB_TOKEN
85+
server-password: # optional, default is GITHUB_TOKEN
86+
# Path to where the settings.xml file will be written. Default is ~/.m2.
87+
settings-path: # optional
88+
# Overwrite the settings.xml file if it exists. Default is "true".
89+
overwrite-settings: # optional, default is true
90+
# GPG private key to import. Default is empty string.
91+
gpg-private-key: # optional
92+
# Environment variable name for the GPG private key passphrase. Default is $GPG_PASSPHRASE.
93+
gpg-passphrase: # optional
94+
# Name of the build platform to cache dependencies. It can be "maven", "gradle" or "sbt".
95+
cache: # optional
96+
# The path to a dependency file: pom.xml, build.gradle, build.sbt, etc. This option can be used with the `cache` option. If this option is omitted, the action searches for the dependency file in the entire repository. This option supports wildcards and a list of file names for caching multiple dependencies.
97+
cache-dependency-path: # optional
98+
# Workaround to pass job status to post job step. This variable is not intended for manual setting
99+
job-status: # optional, default is ${{ job.status }}
100+
# The token used to authenticate when fetching version manifests hosted on github.com, such as for the Microsoft Build of OpenJDK. When running this action on github.com, the default value is sufficient. When running on GHES, you can pass a personal access token for github.com if you are experiencing rate limiting.
101+
token: # optional, default is ${{ github.server_url == 'https://github.com' && github.token || '' }}
102+
# Name of Maven Toolchain ID if the default name of "${distribution}_${java-version}" is not wanted. See examples of supported syntax in Advanced Usage file
103+
mvn-toolchain-id: # optional
104+
# Name of Maven Toolchain Vendor if the default name of "${distribution}" is not wanted. See examples of supported syntax in Advanced Usage file
105+
mvn-toolchain-vendor: # optional
63106

0 commit comments

Comments
 (0)