Compare commits

..

44 Commits

Author SHA1 Message Date
Yang Cao
043fb46d1a
Merge pull request #797 from actions/yacaovsnc/update-dependency
Include changes in typespec/ts-http-runtime 0.3.5
2026-04-10 12:08:32 -04:00
Yang Cao
634250c138 Include changes in typespec/ts-http-runtime 0.3.5 2026-04-10 11:58:04 -04:00
Daniel Kennedy
e454baaac2
Readme: bump all the example versions to v7 (#796) 2026-04-10 10:55:51 -04:00
Daniel Kennedy
74fad66b98
Update the readme with direct upload details (#795)
* Update the readme with direct upload details

* Update the TOC and remove a section

* Fix some wording

* Remove a tautology
2026-04-10 10:49:57 -04:00
Daniel Kennedy
bbbca2ddaa
Support direct file uploads (#764)
* Cache licenses

* Bump minimatch to 10.1.1

* Try fixing licenced issues

* More licensed fixes

* Support direct file uploads

* Add CI tests for direct uploads

* Use download-artifact@main temporarily

* CI: clean up artifacts on successful runs

* Use script v8

* Fix some issues with the cleanup

* Add unit tests

* Clarify naming
2026-02-25 16:04:27 -05:00
Daniel Kennedy
589182c5a4
Upgrade the module to ESM and bump dependencies (#762)
* Upgrade the module to ESM and bump dependencies

* CI: bump node versions

* Push build files

* Fix linting issues

* Bump the package version

* Cache licenses

* Bump minimatch to 10.1.1

* Try fixing licenced issues

* More licensed fixes

* eslint: don't allow common-js imports
2026-02-25 14:01:53 -05:00
Bassem Dghaidi
47309c993a
Merge pull request #754 from actions/Link-/add-proxy-integration-tests
Add proxy integration test
2026-01-30 16:47:01 +01:00
Bassem Dghaidi
02a8460834 Add proxy integration test 2026-01-30 02:29:30 -08:00
Salman Chishti
b7c566a772
Merge pull request #745 from actions/upload-artifact-v6-release
prepare release v6.0.0 for Node.js 24 support
2025-12-12 17:58:04 +00:00
Salman Muin Kayser Chishti
e516bc8500 docs: correct description of Node.js 24 support in README 2025-12-12 17:41:47 +00:00
Salman Muin Kayser Chishti
ddc45ed9bc docs: update README to correct action name for Node.js 24 support 2025-12-12 17:38:00 +00:00
Salman Muin Kayser Chishti
615b319bd2 chore: release v6.0.0 for Node.js 24 support
- Update to Node.js 24 runtime (runs.using: node24)
- Bump version to 6.0.0
- Update README with v6 release notes
- Rebuild dist
2025-12-12 17:31:54 +00:00
Salman Chishti
017748b48f
Merge pull request #744 from actions/fix-storage-blob
fix: update @actions/artifact for Node.js 24 punycode deprecation
2025-12-12 17:15:18 +00:00
Salman Muin Kayser Chishti
38d4c7997f chore: rebuild dist 2025-12-12 16:46:49 +00:00
Salman Muin Kayser Chishti
7d27270e0c chore: add missing license cache files for @actions/core, @actions/io, and minimatch 2025-12-12 16:43:44 +00:00
Salman Muin Kayser Chishti
5f643d3c94 chore: update license files for @actions/artifact@5.0.1 dependencies 2025-12-12 16:39:57 +00:00
Salman Muin Kayser Chishti
1df1684032 chore: update package-lock.json with @actions/artifact@5.0.1 2025-12-12 16:39:51 +00:00
Salman Muin Kayser Chishti
b5b1a91840 fix: update @actions/artifact to ^5.0.0 for Node.js 24 punycode fix
Updates @actions/artifact dependency to use the published npm version
which includes @azure/storage-blob ^12.29.1 that fixes the punycode
deprecation warning on Node.js 24.
2025-12-12 16:39:45 +00:00
Salman Muin Kayser Chishti
184708f738 fix: update @actions/artifact with storage-blob fix for Node.js 24 punycode deprecation 2025-12-12 15:06:59 +00:00
Salman Chishti
b340c4ff46
Merge pull request #719 from actions/node24
Upload Artifact Node 24 support
2025-12-12 14:39:28 +00:00
Salman Muin Kayser Chishti
867bba2a6b chore: add missing eslint plugins and update to compatible versions 2025-12-12 09:08:26 +00:00
Salman Muin Kayser Chishti
471b053ce1 chore: add eslint-plugin-prettier and upgrade prettier to v3 2025-12-12 09:02:29 +00:00
Salman Muin Kayser Chishti
0d59ab325a chore: add unversioned license files for @actions/core, @actions/io, and minimatch 2025-12-12 09:00:21 +00:00
Salman Muin Kayser Chishti
38cbf00a3a chore: rebuild dist files 2025-12-12 08:55:51 +00:00
Salman Muin Kayser Chishti
65c405260d fix: update license files for @bufbuild/protobuf and sax 2025-12-12 08:55:13 +00:00
Salman Muin Kayser Chishti
985108560d fix: use published @actions/artifact@5.0.0 from npm 2025-12-12 08:52:57 +00:00
Salman Muin Kayser Chishti
0d8ecc924d Merge origin/main and resolve conflicts for node24
- Updated @actions/artifact to ^5.0.0
- Updated @actions/core to ^2.0.0
- Regenerated dist files and license cache
2025-12-12 08:32:24 +00:00
Salman Muin Kayser Chishti
75274a8f39 chore: update package-lock.json 2025-12-11 23:05:12 +00:00
Salman Muin Kayser Chishti
f77a7e9888 chore: regenerate license cache for updated dependencies 2025-12-11 23:05:06 +00:00
Salman Muin Kayser Chishti
bed0e56780 chore: add license text for packages with missing licenses
- @bufbuild/protobuf: Apache-2.0 (from upstream LICENSE file)
- buffers: marked as reviewed (no license in npm)
- chainsaw: MIT/X11 (from npm registry)
2025-12-11 23:05:00 +00:00
Salman Muin Kayser Chishti
91ba4ec18c chore: update .licensed.yml config for node24 dependencies
- Add 0bsd and blueoak-1.0.0 to allowed licenses
- Add reviewed packages for dependencies with non-standard licenses
- Enable UTF-8 encoding
2025-12-11 23:04:52 +00:00
Salman Muin Kayser Chishti
87458809df chore: update dependencies to use published npm packages 2025-12-11 19:36:14 +00:00
Salman Muin Kayser Chishti
8b8de53667 chore: use local @actions/core, glob, io packages 2025-12-09 11:55:30 +00:00
Daniel Kennedy
330a01c490
Merge pull request #734 from actions/danwkennedy/prepare-5.0.0
Prepare `v5.0.0`
2025-10-24 14:15:34 -04:00
Daniel Kennedy
03f2824452 Update github.dep.yml 2025-10-24 14:06:12 -04:00
Daniel Kennedy
905a1ecb59 Prepare v5.0.0 2025-10-24 14:01:51 -04:00
Zachary Taylor
2d9f9cdfa9
Merge pull request #725 from patrikpolyak/patch-1
Update GHES guidance to include reference to Node 20 version
2025-10-23 10:20:12 -04:00
Salman Muin Kayser Chishti
d2e7727e56 update dist 2025-10-15 15:20:28 +01:00
Patrik Polyak
9687587dec
Merge branch 'main' into patch-1 2025-10-01 11:18:18 +02:00
Salman Muin Kayser Chishti
bdfe531d8f licence updates 2025-09-29 14:50:01 +01:00
Salman Muin Kayser Chishti
98d3bf521e upadate spacing 2025-09-29 14:48:36 +01:00
Salman Muin Kayser Chishti
48ddad3e02 Update to use Node 24 with local artifact package and security fixes 2025-09-29 14:44:42 +01:00
Patrik Polyak
cd231ca1ed
Update GHES guidance to include reference to Node 20 version
`v3` uses Node 16 which is deprecated. `v3-node20` has been available for a while which uses Node 20 so we should reflect this in the documentation.
2025-09-15 12:12:01 +02:00
Salman Chishti
6c33d18d0a update to use node 24 2025-07-25 11:27:43 +00:00
208 changed files with 150312 additions and 208016 deletions

View File

@ -1,3 +0,0 @@
node_modules/
lib/
dist/

View File

@ -1,16 +0,0 @@
{
"env": { "node": true, "jest": true },
"parser": "@typescript-eslint/parser",
"parserOptions": { "ecmaVersion": 9, "sourceType": "module" },
"extends": [
"eslint:recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:prettier/recommended"
],
"rules": {
"@typescript-eslint/no-empty-function": "off"
},
"plugins": ["@typescript-eslint", "jest"]
}

View File

@ -24,10 +24,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup Node 20
- name: Setup Node 24
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 24.x
cache: 'npm'
- name: Install dependencies

114
.github/workflows/test-proxy.yml vendored Normal file
View File

@ -0,0 +1,114 @@
name: Test Proxy
on:
push:
branches:
- main
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
permissions:
contents: read
jobs:
# End to end upload with proxy
test-proxy-upload:
runs-on: ubuntu-latest
container:
image: ubuntu:latest
options: --cap-add=NET_ADMIN
services:
squid-proxy:
image: ubuntu/squid:latest
ports:
- 3128:3128
env:
http_proxy: http://squid-proxy:3128
https_proxy: http://squid-proxy:3128
steps:
- name: Wait for proxy to be ready
shell: bash
run: |
echo "Waiting for squid proxy to be ready..."
echo "Resolving squid-proxy hostname:"
getent hosts squid-proxy || echo "DNS resolution failed"
for i in $(seq 1 30); do
if (echo > /dev/tcp/squid-proxy/3128) 2>/dev/null; then
echo "Proxy is ready!"
exit 0
fi
echo "Attempt $i: Proxy not ready, waiting..."
sleep 2
done
echo "Proxy failed to become ready"
exit 1
env:
http_proxy: ""
https_proxy: ""
- name: Install dependencies
run: |
apt-get update
apt-get install -y iptables curl
- name: Verify proxy is working
run: |
echo "Testing proxy connectivity..."
curl -s -o /dev/null -w "%{http_code}" --proxy http://squid-proxy:3128 http://github.com || true
echo "Proxy verification complete"
- name: Block direct traffic (enforce proxy usage)
run: |
# Get the squid-proxy container IP
PROXY_IP=$(getent hosts squid-proxy | awk '{ print $1 }')
echo "Proxy IP: $PROXY_IP"
# Allow loopback traffic
iptables -A OUTPUT -o lo -j ACCEPT
# Allow traffic to the proxy container
iptables -A OUTPUT -d $PROXY_IP -j ACCEPT
# Allow established connections
iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# Allow DNS (needed for initial resolution)
iptables -A OUTPUT -p udp --dport 53 -j ACCEPT
iptables -A OUTPUT -p tcp --dport 53 -j ACCEPT
# Block all other outbound traffic (HTTP/HTTPS)
iptables -A OUTPUT -p tcp --dport 80 -j REJECT
iptables -A OUTPUT -p tcp --dport 443 -j REJECT
# Log the iptables rules for debugging
iptables -L -v -n
- name: Verify direct HTTPS is blocked
run: |
echo "Testing that direct HTTPS requests fail..."
if curl --noproxy '*' -s --connect-timeout 5 https://github.com > /dev/null 2>&1; then
echo "ERROR: Direct HTTPS request succeeded - blocking is not working!"
exit 1
else
echo "SUCCESS: Direct HTTPS request was blocked as expected"
fi
echo "Testing that HTTPS through proxy succeeds..."
if curl --proxy http://squid-proxy:3128 -s --connect-timeout 10 https://github.com > /dev/null 2>&1; then
echo "SUCCESS: HTTPS request through proxy succeeded"
else
echo "ERROR: HTTPS request through proxy failed!"
exit 1
fi
- name: Checkout
uses: actions/checkout@v4
- name: Create artifact file
run: |
mkdir -p test-artifacts
echo "Proxy test artifact - $GITHUB_RUN_ID" > test-artifacts/proxy-test.txt
echo "Random data: $RANDOM $RANDOM $RANDOM" >> test-artifacts/proxy-test.txt
cat test-artifacts/proxy-test.txt
- name: Upload artifact through proxy
uses: ./
with:
name: 'Proxy-Test-Artifact-${{ github.run_id }}'
path: test-artifacts/proxy-test.txt

View File

@ -10,6 +10,10 @@ on:
paths-ignore:
- '**.md'
permissions:
contents: read
actions: write
jobs:
build:
name: Build
@ -25,10 +29,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node 20
- name: Setup Node 24
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 24.x
cache: 'npm'
- name: Install dependencies
@ -94,7 +98,7 @@ jobs:
# Download Artifact #1 and verify the correctness of the content
- name: 'Download artifact #1'
uses: actions/download-artifact@v4
uses: actions/download-artifact@main
with:
name: 'Artifact-A-${{ matrix.runs-on }}'
path: some/new/path
@ -114,7 +118,7 @@ jobs:
# Download Artifact #2 and verify the correctness of the content
- name: 'Download artifact #2'
uses: actions/download-artifact@v4
uses: actions/download-artifact@main
with:
name: 'Artifact-Wildcard-${{ matrix.runs-on }}'
path: some/other/path
@ -135,7 +139,7 @@ jobs:
# Download Artifact #4 and verify the correctness of the content
- name: 'Download artifact #4'
uses: actions/download-artifact@v4
uses: actions/download-artifact@main
with:
name: 'Multi-Path-Artifact-${{ matrix.runs-on }}'
path: multi/artifact
@ -155,7 +159,7 @@ jobs:
shell: pwsh
- name: 'Download symlinked artifact'
uses: actions/download-artifact@v4
uses: actions/download-artifact@main
with:
name: 'Symlinked-Artifact-${{ matrix.runs-on }}'
path: from/symlink
@ -196,7 +200,7 @@ jobs:
# Download replaced Artifact #1 and verify the correctness of the content
- name: 'Download artifact #1 again'
uses: actions/download-artifact@v4
uses: actions/download-artifact@main
with:
name: 'Artifact-A-${{ matrix.runs-on }}'
path: overwrite/some/new/path
@ -213,6 +217,101 @@ jobs:
Write-Error "File contents of downloaded artifact are incorrect"
}
shell: pwsh
# Upload a single file without archiving (direct file upload)
- name: 'Create direct upload file'
run: echo -n 'direct file upload content' > direct-upload-${{ matrix.runs-on }}.txt
shell: bash
- name: 'Upload direct file artifact'
uses: ./
with:
name: 'Direct-File-${{ matrix.runs-on }}'
path: direct-upload-${{ matrix.runs-on }}.txt
archive: false
- name: 'Download direct file artifact'
uses: actions/download-artifact@main
with:
name: direct-upload-${{ matrix.runs-on }}.txt
path: direct-download
- name: 'Verify direct file artifact'
run: |
$file = "direct-download/direct-upload-${{ matrix.runs-on }}.txt"
if(!(Test-Path -path $file))
{
Write-Error "Expected file does not exist"
}
if(!((Get-Content $file -Raw).TrimEnd() -ceq "direct file upload content"))
{
Write-Error "File contents of downloaded artifact are incorrect"
}
shell: pwsh
upload-html-report:
name: Upload HTML Report
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node 24
uses: actions/setup-node@v4
with:
node-version: 24.x
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Compile
run: npm run build
- name: Create HTML report
run: |
cat > report.html << 'EOF'
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Artifact Upload Test Report</title>
<style>
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif; max-width: 800px; margin: 40px auto; padding: 0 20px; color: #24292f; }
h1 { border-bottom: 1px solid #d0d7de; padding-bottom: 8px; }
.success { color: #1a7f37; }
.info { background: #ddf4ff; border: 1px solid #54aeff; border-radius: 6px; padding: 12px 16px; margin: 16px 0; }
table { border-collapse: collapse; width: 100%; margin: 16px 0; }
th, td { border: 1px solid #d0d7de; padding: 8px 12px; text-align: left; }
th { background: #f6f8fa; }
</style>
</head>
<body>
<h1>Artifact Upload Test Report</h1>
<div class="info">
<strong>This HTML file was uploaded as a single un-zipped artifact.</strong>
If you can see this in the browser, the feature is working correctly!
</div>
<table>
<tr><th>Property</th><th>Value</th></tr>
<tr><td>Upload method</td><td><code>archive: false</code></td></tr>
<tr><td>Content-Type</td><td><code>text/html</code></td></tr>
<tr><td>File</td><td><code>report.html</code></td></tr>
</table>
<p class="success">&#10004; Single file upload is working!</p>
</body>
</html>
EOF
- name: Upload HTML report (no archive)
uses: ./
with:
name: 'test-report'
path: report.html
archive: false
merge:
name: Merge
needs: build
@ -230,7 +329,7 @@ jobs:
# easier to identify each of the merged artifacts
separate-directories: true
- name: 'Download merged artifacts'
uses: actions/download-artifact@v4
uses: actions/download-artifact@main
with:
name: merged-artifacts
path: all-merged-artifacts
@ -266,7 +365,7 @@ jobs:
# Download merged artifacts and verify the correctness of the content
- name: 'Download merged artifacts'
uses: actions/download-artifact@v4
uses: actions/download-artifact@main
with:
name: Merged-Artifact-As
path: merged-artifact-a
@ -290,3 +389,40 @@ jobs:
}
shell: pwsh
cleanup:
name: Cleanup Artifacts
needs: [build, merge]
runs-on: ubuntu-latest
steps:
- name: Delete test artifacts
uses: actions/github-script@v8
with:
script: |
const keep = ['report.html'];
const owner = context.repo.owner;
const repo = context.repo.repo;
const runId = context.runId;
const {data: {artifacts}} = await github.rest.actions.listWorkflowRunArtifacts({
owner,
repo,
run_id: runId
});
for (const a of artifacts) {
if (keep.includes(a.name)) {
console.log(`Keeping artifact '${a.name}'`);
continue;
}
try {
await github.rest.actions.deleteArtifact({
owner,
repo,
artifact_id: a.id
});
console.log(`Deleted artifact '${a.name}'`);
} catch (err) {
console.log(`Could not delete artifact '${a.name}': ${err.message}`);
}
}

3
.gitignore vendored
View File

@ -1,3 +1,4 @@
node_modules/
lib/
__tests__/_temp/
__tests__/_temp/
.DS_Store

View File

@ -1,6 +1,9 @@
sources:
npm: true
# Force UTF-8 encoding
encoding: 'utf-8'
allowed:
- apache-2.0
- bsd-2-clause
@ -9,7 +12,30 @@ allowed:
- mit
- cc0-1.0
- unlicense
- 0bsd
- blueoak-1.0.0
reviewed:
npm:
- fs.realpath
- fs.realpath
- "@actions/http-client" # MIT
- "@bufbuild/protobuf" # Apache-2.0
- "@pkgjs/parseargs" # MIT
- "@protobuf-ts/runtime" # Apache-2.0
- argparse # Python-2.0
- buffers # MIT
- chainsaw # MIT
- color-convert # MIT
- ieee754 # BSD-3-Clause
- lodash # MIT
- mdurl # MIT
- neo-async # MIT
- package-json-from-dist # ISC
- readable-stream # MIT
- sax # ISC
- source-map # BSD-3-Clause
- string_decoder # MIT
- traverse # MIT
- tslib # 0BSD
- uglify-js # BSD-2-Clause
- wordwrap # MIT

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More