mirror of
https://github.com/actions/setup-java.git
synced 2025-03-13 09:37:03 +00:00
Merge branch 'main' into v-mshaganov/test-java
This commit is contained in:
commit
f8c7e8138b
11 changed files with 77 additions and 6330 deletions
5
.github/workflows/build.yml
vendored
5
.github/workflows/build.yml
vendored
|
@ -27,7 +27,4 @@ jobs:
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- run: npm run build
|
- run: npm run build
|
||||||
- run: npm run format-check
|
- run: npm run format-check
|
||||||
- run: npm test
|
- run: npm test
|
||||||
- name: Verify no unstaged changes
|
|
||||||
if: runner.os != 'windows'
|
|
||||||
run: bash __tests__/verify-no-unstaged-changes.sh
|
|
51
.github/workflows/check-dist.yml
vendored
Normal file
51
.github/workflows/check-dist.yml
vendored
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
# `dist/index.js` is a special file in Actions.
|
||||||
|
# When you reference an action with `uses:` in a workflow,
|
||||||
|
# `index.js` is the code that will run.
|
||||||
|
# For our project, we generate this file through a build process from other source files.
|
||||||
|
# We need to make sure the checked-in `index.js` actually matches what we expect it to be.
|
||||||
|
name: Check dist/
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
pull_request:
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-dist:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set Node.js 12.x
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 12.x
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Rebuild the dist/ directory
|
||||||
|
run: npm run build
|
||||||
|
|
||||||
|
- name: Compare the expected and actual dist/ directories
|
||||||
|
run: |
|
||||||
|
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
|
||||||
|
echo "Detected uncommitted changes after build. See status below:"
|
||||||
|
git diff
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
id: diff
|
||||||
|
|
||||||
|
# If index.js was different than expected, upload the expected version as an artifact
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
|
||||||
|
with:
|
||||||
|
name: dist
|
||||||
|
path: dist/
|
10
.github/workflows/licensed.yml
vendored
10
.github/workflows/licensed.yml
vendored
|
@ -1,8 +1,12 @@
|
||||||
name: Licensed
|
name: Licensed
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push: {branches: main}
|
push:
|
||||||
pull_request: {branches: main}
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
|
@ -17,4 +21,4 @@ jobs:
|
||||||
curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/2.12.2/licensed-2.12.2-linux-x64.tar.gz
|
curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/2.12.2/licensed-2.12.2-linux-x64.tar.gz
|
||||||
sudo tar -xzf licensed.tar.gz
|
sudo tar -xzf licensed.tar.gz
|
||||||
sudo mv licensed /usr/local/bin/licensed
|
sudo mv licensed /usr/local/bin/licensed
|
||||||
- run: licensed status
|
- run: licensed status
|
||||||
|
|
2
.licenses/npm/@actions/http-client.dep.yml
generated
2
.licenses/npm/@actions/http-client.dep.yml
generated
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
name: "@actions/http-client"
|
name: "@actions/http-client"
|
||||||
version: 1.0.9
|
version: 1.0.11
|
||||||
type: npm
|
type: npm
|
||||||
summary: Actions Http Client
|
summary: Actions Http Client
|
||||||
homepage: https://github.com/actions/http-client#readme
|
homepage: https://github.com/actions/http-client#readme
|
||||||
|
|
|
@ -75,7 +75,7 @@ steps:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: '11'
|
java-version: '11'
|
||||||
cache: 'gradle'
|
cache: 'gradle'
|
||||||
- run: ./gradlew build
|
- run: ./gradlew build --no-daemon
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Caching maven dependencies
|
#### Caching maven dependencies
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
if [[ "$(git status --porcelain)" != "" ]]; then
|
|
||||||
echo ----------------------------------------
|
|
||||||
echo git status
|
|
||||||
echo ----------------------------------------
|
|
||||||
git status
|
|
||||||
echo ----------------------------------------
|
|
||||||
echo git diff
|
|
||||||
echo ----------------------------------------
|
|
||||||
git diff
|
|
||||||
echo ----------------------------------------
|
|
||||||
echo Troubleshooting
|
|
||||||
echo ----------------------------------------
|
|
||||||
echo "::error::Unstaged changes detected. Locally try running: git clean -ffdx && npm ci && npm run pre-checkin"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
7
dist/cleanup/index.js
vendored
7
dist/cleanup/index.js
vendored
|
@ -49663,7 +49663,9 @@ class HttpClient {
|
||||||
maxSockets: maxSockets,
|
maxSockets: maxSockets,
|
||||||
keepAlive: this._keepAlive,
|
keepAlive: this._keepAlive,
|
||||||
proxy: {
|
proxy: {
|
||||||
proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`,
|
...((proxyUrl.username || proxyUrl.password) && {
|
||||||
|
proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`
|
||||||
|
}),
|
||||||
host: proxyUrl.hostname,
|
host: proxyUrl.hostname,
|
||||||
port: proxyUrl.port
|
port: proxyUrl.port
|
||||||
}
|
}
|
||||||
|
@ -63235,10 +63237,9 @@ function importKey(privateKey) {
|
||||||
exports.importKey = importKey;
|
exports.importKey = importKey;
|
||||||
function deleteKey(keyFingerprint) {
|
function deleteKey(keyFingerprint) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
yield exec.exec('gpg', ['--batch', '--yes', '--delete-secret-keys', keyFingerprint], {
|
yield exec.exec('gpg', ['--batch', '--yes', '--delete-secret-and-public-key', keyFingerprint], {
|
||||||
silent: true
|
silent: true
|
||||||
});
|
});
|
||||||
yield exec.exec('gpg', ['--batch', '--yes', '--delete-keys', keyFingerprint], { silent: true });
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.deleteKey = deleteKey;
|
exports.deleteKey = deleteKey;
|
||||||
|
|
7
dist/setup/index.js
vendored
7
dist/setup/index.js
vendored
|
@ -39653,7 +39653,9 @@ class HttpClient {
|
||||||
maxSockets: maxSockets,
|
maxSockets: maxSockets,
|
||||||
keepAlive: this._keepAlive,
|
keepAlive: this._keepAlive,
|
||||||
proxy: {
|
proxy: {
|
||||||
proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`,
|
...((proxyUrl.username || proxyUrl.password) && {
|
||||||
|
proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`
|
||||||
|
}),
|
||||||
host: proxyUrl.hostname,
|
host: proxyUrl.hostname,
|
||||||
port: proxyUrl.port
|
port: proxyUrl.port
|
||||||
}
|
}
|
||||||
|
@ -94687,10 +94689,9 @@ function importKey(privateKey) {
|
||||||
exports.importKey = importKey;
|
exports.importKey = importKey;
|
||||||
function deleteKey(keyFingerprint) {
|
function deleteKey(keyFingerprint) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
yield exec.exec('gpg', ['--batch', '--yes', '--delete-secret-keys', keyFingerprint], {
|
yield exec.exec('gpg', ['--batch', '--yes', '--delete-secret-and-public-key', keyFingerprint], {
|
||||||
silent: true
|
silent: true
|
||||||
});
|
});
|
||||||
yield exec.exec('gpg', ['--batch', '--yes', '--delete-keys', keyFingerprint], { silent: true });
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.deleteKey = deleteKey;
|
exports.deleteKey = deleteKey;
|
||||||
|
|
6301
package-lock.json
generated
6301
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -28,7 +28,7 @@
|
||||||
"@actions/core": "^1.2.6",
|
"@actions/core": "^1.2.6",
|
||||||
"@actions/exec": "^1.0.4",
|
"@actions/exec": "^1.0.4",
|
||||||
"@actions/glob": "^0.2.0",
|
"@actions/glob": "^0.2.0",
|
||||||
"@actions/http-client": "^1.0.9",
|
"@actions/http-client": "^1.0.11",
|
||||||
"@actions/io": "^1.0.2",
|
"@actions/io": "^1.0.2",
|
||||||
"@actions/tool-cache": "^1.6.1",
|
"@actions/tool-cache": "^1.6.1",
|
||||||
"semver": "^7.3.4",
|
"semver": "^7.3.4",
|
||||||
|
|
|
@ -39,8 +39,7 @@ export async function importKey(privateKey: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function deleteKey(keyFingerprint: string) {
|
export async function deleteKey(keyFingerprint: string) {
|
||||||
await exec.exec('gpg', ['--batch', '--yes', '--delete-secret-keys', keyFingerprint], {
|
await exec.exec('gpg', ['--batch', '--yes', '--delete-secret-and-public-key', keyFingerprint], {
|
||||||
silent: true
|
silent: true
|
||||||
});
|
});
|
||||||
await exec.exec('gpg', ['--batch', '--yes', '--delete-keys', keyFingerprint], { silent: true });
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue