Merge branch 'main' into v-mshaganov/test-java

This commit is contained in:
Dmitry Shibanov 2021-09-24 11:24:47 +03:00
commit f8c7e8138b
11 changed files with 77 additions and 6330 deletions

View file

@ -28,6 +28,3 @@ jobs:
- 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
View 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/

View file

@ -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:

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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
View file

@ -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

File diff suppressed because it is too large Load diff

View file

@ -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",

View file

@ -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 });
} }