mirror of
https://github.com/actions/setup-java.git
synced 2024-11-27 03:59:02 +00:00
Update packages to support http_proxy
This commit is contained in:
parent
63d68602dd
commit
90c448a85d
36
.github/workflows/workflow.yml
vendored
36
.github/workflows/workflow.yml
vendored
@ -24,3 +24,39 @@ jobs:
|
|||||||
|
|
||||||
- name: npm test
|
- name: npm test
|
||||||
run: npm test
|
run: npm test
|
||||||
|
run-with-proxy:
|
||||||
|
name: Run with proxy
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
services:
|
||||||
|
squid:
|
||||||
|
image: dakale/squid
|
||||||
|
ports: ['3128:3128']
|
||||||
|
options: '--health-cmd "exit 0" --health-interval 3s'
|
||||||
|
env:
|
||||||
|
http_proxy: http://localhost:3128
|
||||||
|
https_proxy: http://localhost:3128
|
||||||
|
steps:
|
||||||
|
- name: Block non proxied traffic
|
||||||
|
run: |
|
||||||
|
echo "127.0.0.0 registry.npm.js nodejs.org github.com api.github.com download.java.net static.azul.com" | sudo tee -a /etc/hosts
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@master
|
||||||
|
|
||||||
|
- name: Set Node.js 10.x
|
||||||
|
uses: actions/setup-node@master
|
||||||
|
with:
|
||||||
|
node-version: 10.x
|
||||||
|
|
||||||
|
- name: npm install
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Lint
|
||||||
|
run: npm run format-check
|
||||||
|
|
||||||
|
- name: npm test
|
||||||
|
run: npm test
|
||||||
|
|
||||||
|
- name: Check proxy logs
|
||||||
|
run: |
|
||||||
|
docker cp ${{ job.services.squid.id }}:/var/log/squid/access.log access.log
|
||||||
|
cat access.log
|
||||||
|
BIN
dist/index.js
generated
vendored
BIN
dist/index.js
generated
vendored
Binary file not shown.
2108
package-lock.json
generated
2108
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -26,10 +26,10 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.0.0",
|
"@actions/core": "^1.0.0",
|
||||||
"@actions/exec": "^1.0.0",
|
"@actions/exec": "^1.0.0",
|
||||||
|
"@actions/http-client": "^1.0.6",
|
||||||
"@actions/io": "^1.0.0",
|
"@actions/io": "^1.0.0",
|
||||||
"@actions/tool-cache": "^1.0.0",
|
"@actions/tool-cache": "^1.3.1",
|
||||||
"semver": "^6.1.1",
|
"semver": "^6.1.1"
|
||||||
"typed-rest-client": "1.5.0"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^24.0.13",
|
"@types/jest": "^24.0.13",
|
||||||
|
@ -3,11 +3,11 @@ let tempDirectory = process.env['RUNNER_TEMP'] || '';
|
|||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
import * as io from '@actions/io';
|
import * as io from '@actions/io';
|
||||||
import * as exec from '@actions/exec';
|
import * as exec from '@actions/exec';
|
||||||
|
import * as httpm from '@actions/http-client';
|
||||||
import * as tc from '@actions/tool-cache';
|
import * as tc from '@actions/tool-cache';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as semver from 'semver';
|
import * as semver from 'semver';
|
||||||
import * as httpm from 'typed-rest-client/HttpClient';
|
|
||||||
|
|
||||||
const IS_WINDOWS = process.platform === 'win32';
|
const IS_WINDOWS = process.platform === 'win32';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user