mirror of
https://github.com/actions/upload-artifact.git
synced 2025-08-24 07:33:34 +00:00
Merge 201b341fe9
into 551bc9bdf8
This commit is contained in:
commit
ca18acd008
6
.devcontainer/devcontainer.json
Normal file
6
.devcontainer/devcontainer.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
||||||
|
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
|
||||||
|
{
|
||||||
|
"name": "@actions/upload-artifact",
|
||||||
|
"image": "mcr.microsoft.com/devcontainers/typescript-node:0-16"
|
||||||
|
}
|
@ -4,13 +4,10 @@
|
|||||||
"parserOptions": { "ecmaVersion": 9, "sourceType": "module" },
|
"parserOptions": { "ecmaVersion": 9, "sourceType": "module" },
|
||||||
"extends": [
|
"extends": [
|
||||||
"eslint:recommended",
|
"eslint:recommended",
|
||||||
"plugin:@typescript-eslint/eslint-recommended",
|
|
||||||
"plugin:@typescript-eslint/recommended",
|
|
||||||
"plugin:import/errors",
|
"plugin:import/errors",
|
||||||
"plugin:import/warnings",
|
"plugin:import/warnings",
|
||||||
"plugin:import/typescript",
|
"plugin:import/typescript",
|
||||||
"plugin:prettier/recommended",
|
"plugin:prettier/recommended"
|
||||||
"prettier/@typescript-eslint"
|
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
"@typescript-eslint/no-empty-function": "off"
|
"@typescript-eslint/no-empty-function": "off"
|
||||||
|
63
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
Normal file
63
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
name: "🐛 Bug report"
|
||||||
|
description: Let us know about a bug!
|
||||||
|
labels: ['bug']
|
||||||
|
title: '[bug]'
|
||||||
|
body:
|
||||||
|
- type: textarea
|
||||||
|
id: problem
|
||||||
|
attributes:
|
||||||
|
label: What happened?
|
||||||
|
description: |
|
||||||
|
Please provide a clear and concise description of what the bug is. If applicable, add screenshots to help explain your problem.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: expected
|
||||||
|
attributes:
|
||||||
|
label: What did you expect to happen?
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: repro
|
||||||
|
attributes:
|
||||||
|
label: How can we reproduce it?
|
||||||
|
description: |
|
||||||
|
Please be minimal and precise as possible. If your repo/run is public, please include a URL so it is easier for us to investigate.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: additional
|
||||||
|
attributes:
|
||||||
|
label: Anything else we need to know?
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
id: version
|
||||||
|
attributes:
|
||||||
|
label: What version of the action are you using?
|
||||||
|
placeholder: vX.Y.Z
|
||||||
|
description: |
|
||||||
|
Please check the documentation first since different major versions can have different behaviors.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: dropdown
|
||||||
|
id: environment
|
||||||
|
attributes:
|
||||||
|
label: What are your runner environments?
|
||||||
|
multiple: true
|
||||||
|
options:
|
||||||
|
- self-hosted
|
||||||
|
- linux
|
||||||
|
- window
|
||||||
|
- macos
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
id: ghes
|
||||||
|
attributes:
|
||||||
|
label: Are you on GitHub Enterprise Server? If so, what version?
|
||||||
|
placeholder: vX.Y
|
33
.github/ISSUE_TEMPLATE/bug_report.md
vendored
33
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -1,33 +0,0 @@
|
|||||||
---
|
|
||||||
name: Bug report
|
|
||||||
about: Create a report to help us improve
|
|
||||||
title: ''
|
|
||||||
labels: bug
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**Describe the bug**
|
|
||||||
A clear and concise description of what the bug is.
|
|
||||||
|
|
||||||
**Version**
|
|
||||||
- [ ] V1
|
|
||||||
- [ ] V2
|
|
||||||
|
|
||||||
**Environment**
|
|
||||||
- [ ] self-hosted
|
|
||||||
- [ ] Linux
|
|
||||||
- [ ] Windows
|
|
||||||
- [ ] Mac
|
|
||||||
|
|
||||||
**Screenshots**
|
|
||||||
If applicable, add screenshots to help explain your problem.
|
|
||||||
|
|
||||||
**Run/Repo Url**
|
|
||||||
If applicable, and if your repo/run is public, please include a URL so it is easier for us to investigate.
|
|
||||||
|
|
||||||
**How to reproduce**
|
|
||||||
If applicable, add information on how to reproduce the problem.
|
|
||||||
|
|
||||||
**Additional context**
|
|
||||||
Add any other context about the problem here.
|
|
5
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
5
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
blank_issues_enabled: false
|
||||||
|
contact_links:
|
||||||
|
- name: 🙋 Ask a question
|
||||||
|
url: https://github.community/c/code-to-cloud/52
|
||||||
|
about: Please ask and answer questions on GitHub Support Community.
|
28
.github/ISSUE_TEMPLATE/documentation-issues.yml
vendored
Normal file
28
.github/ISSUE_TEMPLATE/documentation-issues.yml
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
name: "📚 Documentation issues"
|
||||||
|
description: Make a suggestion to improve the documentation!
|
||||||
|
labels: ['documentation']
|
||||||
|
title: '[docs]'
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
❗ This is only for documentation updates for files in this repo, ie: `README.md`.
|
||||||
|
|
||||||
|
If you want to suggest changes for the [GitHub Docs](https://docs.github.com/), please [open an issue there](https://github.com/github/docs/issues/new/choose).
|
||||||
|
- type: textarea
|
||||||
|
id: affected
|
||||||
|
attributes:
|
||||||
|
label: What files would you like to change?
|
||||||
|
description: |
|
||||||
|
Please provide permalinks to the specified files and line numbers.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: suggested
|
||||||
|
attributes:
|
||||||
|
label: What are your suggested changes?
|
||||||
|
description: |
|
||||||
|
Give as much detail as you can to help us understand the changes you want to see.
|
||||||
|
validations:
|
||||||
|
required: true
|
20
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
Normal file
20
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
name: "🎁 Feature request"
|
||||||
|
description: Suggest a new feature/enhancement!
|
||||||
|
labels: ['enhancement']
|
||||||
|
title: '[feat req]'
|
||||||
|
body:
|
||||||
|
- type: textarea
|
||||||
|
id: feature
|
||||||
|
attributes:
|
||||||
|
label: What would you like to be added?
|
||||||
|
description: |
|
||||||
|
Please check existing issues to avoid making duplicates. Any duplicate issue will be closed immediately.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: reasoning
|
||||||
|
attributes:
|
||||||
|
label: Why is this needed?
|
||||||
|
validations:
|
||||||
|
required: true
|
37
.github/workflows/check-dist.yml
vendored
37
.github/workflows/check-dist.yml
vendored
@ -10,9 +10,11 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
paths-ignore:
|
||||||
- main
|
- '**.md'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -20,29 +22,32 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set Node.js 12.x
|
- name: Setup Node 20
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 12.x
|
node-version: 20.x
|
||||||
|
cache: 'npm'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
- name: Move the committed index.js file
|
- name: Rebuild the dist/ directory
|
||||||
run: mv dist/index.js /tmp
|
run: npm run build
|
||||||
|
|
||||||
- name: Rebuild the index.js file
|
- name: Compare the expected and actual dist/ directories
|
||||||
run: npm run release
|
run: |
|
||||||
|
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
|
||||||
- name: Compare the expected and actual index.js files
|
echo "Detected uncommitted changes after build. See status below:"
|
||||||
run: git diff --ignore-all-space dist/index.js /tmp/index.js
|
git diff
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
id: diff
|
id: diff
|
||||||
|
|
||||||
# If index.js was different than expected, upload the expected version as an artifact
|
# If index.js was different than expected, upload the expected version as an artifact
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v4
|
||||||
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
|
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
|
||||||
with:
|
with:
|
||||||
name: index.js
|
name: dist
|
||||||
path: dist/index.js
|
path: dist/
|
||||||
|
8
.github/workflows/codeql-analysis.yml
vendored
8
.github/workflows/codeql-analysis.yml
vendored
@ -17,11 +17,11 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v1
|
uses: github/codeql-action/init@v2
|
||||||
# Override language selection by uncommenting this and choosing your languages
|
# Override language selection by uncommenting this and choosing your languages
|
||||||
# with:
|
# with:
|
||||||
# languages: go, javascript, csharp, python, cpp, java
|
# languages: go, javascript, csharp, python, cpp, java
|
||||||
@ -29,7 +29,7 @@ jobs:
|
|||||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||||
# If this step fails, then you should remove it and run the build manually (see below)
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@v1
|
uses: github/codeql-action/autobuild@v2
|
||||||
|
|
||||||
# ℹ️ Command-line programs to run using the OS shell.
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
# 📚 https://git.io/JvXDl
|
# 📚 https://git.io/JvXDl
|
||||||
@ -43,4 +43,4 @@ jobs:
|
|||||||
# make release
|
# make release
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v1
|
uses: github/codeql-action/analyze@v2
|
||||||
|
92
.github/workflows/codeql.yml
vendored
Normal file
92
.github/workflows/codeql.yml
vendored
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
# For most projects, this workflow file will not need changing; you simply need
|
||||||
|
# to commit it to your repository.
|
||||||
|
#
|
||||||
|
# You may wish to alter this file to override the set of languages analyzed,
|
||||||
|
# or to provide custom queries or build logic.
|
||||||
|
#
|
||||||
|
# ******** NOTE ********
|
||||||
|
# We have attempted to detect the languages in your repository. Please check
|
||||||
|
# the `language` matrix defined below to confirm you have the correct set of
|
||||||
|
# supported CodeQL languages.
|
||||||
|
#
|
||||||
|
name: "CodeQL Advanced"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "main" ]
|
||||||
|
schedule:
|
||||||
|
- cron: '35 10 * * 6'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
analyze:
|
||||||
|
name: Analyze (${{ matrix.language }})
|
||||||
|
# Runner size impacts CodeQL analysis time. To learn more, please see:
|
||||||
|
# - https://gh.io/recommended-hardware-resources-for-running-codeql
|
||||||
|
# - https://gh.io/supported-runners-and-hardware-resources
|
||||||
|
# - https://gh.io/using-larger-runners (GitHub.com only)
|
||||||
|
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
|
||||||
|
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
|
||||||
|
permissions:
|
||||||
|
# required for all workflows
|
||||||
|
security-events: write
|
||||||
|
|
||||||
|
# required to fetch internal or private CodeQL packs
|
||||||
|
packages: read
|
||||||
|
|
||||||
|
# only required for workflows in private repositories
|
||||||
|
actions: read
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- language: javascript-typescript
|
||||||
|
build-mode: none
|
||||||
|
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
|
||||||
|
# Use `c-cpp` to analyze code written in C, C++ or both
|
||||||
|
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
|
||||||
|
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
|
||||||
|
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
|
||||||
|
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
|
||||||
|
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
|
||||||
|
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# Initializes the CodeQL tools for scanning.
|
||||||
|
- name: Initialize CodeQL
|
||||||
|
uses: github/codeql-action/init@v3
|
||||||
|
with:
|
||||||
|
languages: ${{ matrix.language }}
|
||||||
|
build-mode: ${{ matrix.build-mode }}
|
||||||
|
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||||
|
# By default, queries listed here will override any specified in a config file.
|
||||||
|
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||||
|
|
||||||
|
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
||||||
|
# queries: security-extended,security-and-quality
|
||||||
|
|
||||||
|
# If the analyze step fails for one of the languages you are analyzing with
|
||||||
|
# "We were unable to automatically build your code", modify the matrix above
|
||||||
|
# to set the build mode to "manual" for that language. Then modify this step
|
||||||
|
# to build your code.
|
||||||
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
|
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||||
|
- if: matrix.build-mode == 'manual'
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo 'If you are using a "manual" build mode for one or more of the' \
|
||||||
|
'languages you are analyzing, replace this with the commands to build' \
|
||||||
|
'your code, for example:'
|
||||||
|
echo ' make bootstrap'
|
||||||
|
echo ' make release'
|
||||||
|
exit 1
|
||||||
|
|
||||||
|
- name: Perform CodeQL Analysis
|
||||||
|
uses: github/codeql-action/analyze@v3
|
||||||
|
with:
|
||||||
|
category: "/language:${{matrix.language}}"
|
2
.github/workflows/licensed.yml
vendored
2
.github/workflows/licensed.yml
vendored
@ -13,7 +13,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Check licenses
|
name: Check licenses
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- name: Install licensed
|
- name: Install licensed
|
||||||
run: |
|
run: |
|
||||||
|
28
.github/workflows/npm-grunt.yml
vendored
Normal file
28
.github/workflows/npm-grunt.yml
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
name: NodeJS with Grunt
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node-version: [14.x, 16.x, 18.x]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node-version }}
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
npm install
|
||||||
|
grunt
|
28
.github/workflows/release-new-action-version.yml
vendored
Normal file
28
.github/workflows/release-new-action-version.yml
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
name: Release new action version
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [released]
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
TAG_NAME:
|
||||||
|
description: 'Tag name that the major tag will point to'
|
||||||
|
required: true
|
||||||
|
|
||||||
|
env:
|
||||||
|
TAG_NAME: ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }}
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update_tag:
|
||||||
|
name: Update the major tag to include the ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }} changes
|
||||||
|
environment:
|
||||||
|
name: releaseNewActionVersion
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Update the ${{ env.TAG_NAME }} tag
|
||||||
|
id: update-major-tag
|
||||||
|
uses: actions/publish-action@v0.2.1
|
||||||
|
with:
|
||||||
|
source-tag: ${{ env.TAG_NAME }}
|
||||||
|
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
|
72
.github/workflows/test.yml
vendored
72
.github/workflows/test.yml
vendored
@ -1,4 +1,5 @@
|
|||||||
name: Test
|
name: Test
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
@ -10,7 +11,6 @@ on:
|
|||||||
- '**.md'
|
- '**.md'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
|
|
||||||
@ -23,12 +23,13 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set Node.js 12.x
|
- name: Setup Node 20
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 12.x
|
node-version: 20.x
|
||||||
|
cache: 'npm'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
@ -36,62 +37,53 @@ jobs:
|
|||||||
- name: Compile
|
- name: Compile
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
- name: npm test
|
|
||||||
run: npm test
|
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
run: npm run lint
|
run: npm run lint
|
||||||
|
|
||||||
- name: Format
|
- name: Format
|
||||||
run: npm run format-check
|
run: npm run format-check
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: npm run test
|
||||||
|
|
||||||
# Test end-to-end by uploading two artifacts and then downloading them
|
# Test end-to-end by uploading two artifacts and then downloading them
|
||||||
- name: Create artifact files
|
- name: Create artifact files
|
||||||
run: |
|
run: |
|
||||||
mkdir -p path/to/dir-1
|
mkdir -p path/to/dir-1
|
||||||
mkdir -p path/to/dir-2
|
mkdir -p path/to/dir-2
|
||||||
mkdir -p path/to/dir-3
|
mkdir -p path/to/dir-3
|
||||||
echo "Lorem ipsum dolor sit amet" > path/to/dir-1/file1.txt
|
echo "Lorem ipsum dolor sit amet" > path/to/dir-1/file1.txt
|
||||||
echo "Hello world from file #2" > path/to/dir-2/file2.txt
|
echo "Hello world from file #2" > path/to/dir-2/file2.txt
|
||||||
echo "This is a going to be a test for a large enough file that should get compressed with GZip. The @actions/artifact package uses GZip to upload files. This text should have a compression ratio greater than 100% so it should get uploaded using GZip" > path/to/dir-3/gzip.txt
|
|
||||||
|
|
||||||
# Upload a single file artifact
|
# Upload a single file artifact
|
||||||
- name: 'Upload artifact #1'
|
- name: 'Upload artifact #1'
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
name: 'Artifact-A'
|
name: 'Artifact-A-${{ matrix.runs-on }}'
|
||||||
path: path/to/dir-1/file1.txt
|
path: path/to/dir-1/file1.txt
|
||||||
|
|
||||||
# Upload using a wildcard pattern, name should default to 'artifact' if not provided
|
# Upload using a wildcard pattern
|
||||||
- name: 'Upload artifact #2'
|
- name: 'Upload artifact #2'
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
|
name: 'Artifact-Wildcard-${{ matrix.runs-on }}'
|
||||||
path: path/**/dir*/
|
path: path/**/dir*/
|
||||||
|
|
||||||
# Upload a directory that contains a file that will be uploaded with GZip
|
# Upload a multi-path artifact
|
||||||
- name: 'Upload artifact #3'
|
- name: 'Upload artifact #3'
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
name: 'GZip-Artifact'
|
name: 'Multi-Path-Artifact-${{ matrix.runs-on }}'
|
||||||
path: path/to/dir-3/
|
|
||||||
|
|
||||||
# Upload a directory that contains a file that will be uploaded with GZip
|
|
||||||
- name: 'Upload artifact #4'
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
name: 'Multi-Path-Artifact'
|
|
||||||
path: |
|
path: |
|
||||||
path/to/dir-1/*
|
path/to/dir-1/*
|
||||||
path/to/dir-[23]/*
|
path/to/dir-[23]/*
|
||||||
!path/to/dir-3/*.txt
|
!path/to/dir-3/*.txt
|
||||||
|
|
||||||
# Verify artifacts. Switch to download-artifact@v2 once it's out of preview
|
|
||||||
|
|
||||||
# Download Artifact #1 and verify the correctness of the content
|
# Download Artifact #1 and verify the correctness of the content
|
||||||
- name: 'Download artifact #1'
|
- name: 'Download artifact #1'
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: 'Artifact-A'
|
name: 'Artifact-A-${{ matrix.runs-on }}'
|
||||||
path: some/new/path
|
path: some/new/path
|
||||||
|
|
||||||
- name: 'Verify Artifact #1'
|
- name: 'Verify Artifact #1'
|
||||||
@ -109,9 +101,9 @@ jobs:
|
|||||||
|
|
||||||
# Download Artifact #2 and verify the correctness of the content
|
# Download Artifact #2 and verify the correctness of the content
|
||||||
- name: 'Download artifact #2'
|
- name: 'Download artifact #2'
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: 'artifact'
|
name: 'Artifact-Wildcard-${{ matrix.runs-on }}'
|
||||||
path: some/other/path
|
path: some/other/path
|
||||||
|
|
||||||
- name: 'Verify Artifact #2'
|
- name: 'Verify Artifact #2'
|
||||||
@ -127,32 +119,12 @@ jobs:
|
|||||||
Write-Error "File contents of downloaded artifacts are incorrect"
|
Write-Error "File contents of downloaded artifacts are incorrect"
|
||||||
}
|
}
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
|
|
||||||
# Download Artifact #3 and verify the correctness of the content
|
|
||||||
- name: 'Download artifact #3'
|
|
||||||
uses: actions/download-artifact@v1
|
|
||||||
with:
|
|
||||||
name: 'GZip-Artifact'
|
|
||||||
path: gzip/artifact/path
|
|
||||||
|
|
||||||
# Because a directory was used as input during the upload the parent directories, path/to/dir-3/, should not be included in the uploaded artifact
|
|
||||||
- name: 'Verify Artifact #3'
|
|
||||||
run: |
|
|
||||||
$gzipFile = "gzip/artifact/path/gzip.txt"
|
|
||||||
if(!(Test-Path -path $gzipFile))
|
|
||||||
{
|
|
||||||
Write-Error "Expected file do not exist"
|
|
||||||
}
|
|
||||||
if(!((Get-Content $gzipFile) -ceq "This is a going to be a test for a large enough file that should get compressed with GZip. The @actions/artifact package uses GZip to upload files. This text should have a compression ratio greater than 100% so it should get uploaded using GZip"))
|
|
||||||
{
|
|
||||||
Write-Error "File contents of downloaded artifact is incorrect"
|
|
||||||
}
|
|
||||||
shell: pwsh
|
|
||||||
|
|
||||||
|
# Download Artifact #4 and verify the correctness of the content
|
||||||
- name: 'Download artifact #4'
|
- name: 'Download artifact #4'
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: 'Multi-Path-Artifact'
|
name: 'Multi-Path-Artifact-${{ matrix.runs-on }}'
|
||||||
path: multi/artifact
|
path: multi/artifact
|
||||||
|
|
||||||
- name: 'Verify Artifact #4'
|
- name: 'Verify Artifact #4'
|
||||||
|
BIN
.licenses/npm/@actions/artifact.dep.yml
generated
BIN
.licenses/npm/@actions/artifact.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@actions/core.dep.yml
generated
BIN
.licenses/npm/@actions/core.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@actions/github.dep.yml
generated
Normal file
BIN
.licenses/npm/@actions/github.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/@actions/glob.dep.yml
generated
BIN
.licenses/npm/@actions/glob.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@actions/http-client.dep.yml
generated
BIN
.licenses/npm/@actions/http-client.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@actions/io.dep.yml
generated
BIN
.licenses/npm/@actions/io.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@azure/abort-controller.dep.yml
generated
Normal file
BIN
.licenses/npm/@azure/abort-controller.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/@azure/core-auth.dep.yml
generated
Normal file
BIN
.licenses/npm/@azure/core-auth.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/@azure/core-http.dep.yml
generated
Normal file
BIN
.licenses/npm/@azure/core-http.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/@azure/core-lro.dep.yml
generated
Normal file
BIN
.licenses/npm/@azure/core-lro.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/@azure/core-paging.dep.yml
generated
Normal file
BIN
.licenses/npm/@azure/core-paging.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/@azure/core-tracing.dep.yml
generated
Normal file
BIN
.licenses/npm/@azure/core-tracing.dep.yml
generated
Normal file
Binary file not shown.
Binary file not shown.
BIN
.licenses/npm/@azure/logger.dep.yml
generated
Normal file
BIN
.licenses/npm/@azure/logger.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/@azure/storage-blob.dep.yml
generated
Normal file
BIN
.licenses/npm/@azure/storage-blob.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/@fastify/busboy.dep.yml
generated
Normal file
BIN
.licenses/npm/@fastify/busboy.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/@octokit/auth-token.dep.yml
generated
Normal file
BIN
.licenses/npm/@octokit/auth-token.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/@octokit/core.dep.yml
generated
Normal file
BIN
.licenses/npm/@octokit/core.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/@octokit/endpoint.dep.yml
generated
Normal file
BIN
.licenses/npm/@octokit/endpoint.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/@octokit/graphql.dep.yml
generated
Normal file
BIN
.licenses/npm/@octokit/graphql.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/@octokit/openapi-types-12.11.0.dep.yml
generated
Normal file
BIN
.licenses/npm/@octokit/openapi-types-12.11.0.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/@octokit/openapi-types-19.1.0.dep.yml
generated
Normal file
BIN
.licenses/npm/@octokit/openapi-types-19.1.0.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/@octokit/plugin-paginate-rest.dep.yml
generated
Normal file
BIN
.licenses/npm/@octokit/plugin-paginate-rest.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/@octokit/plugin-request-log.dep.yml
generated
Normal file
BIN
.licenses/npm/@octokit/plugin-request-log.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/@octokit/plugin-rest-endpoint-methods.dep.yml
generated
Normal file
BIN
.licenses/npm/@octokit/plugin-rest-endpoint-methods.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/@octokit/plugin-retry.dep.yml
generated
Normal file
BIN
.licenses/npm/@octokit/plugin-retry.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/@octokit/request-error-2.1.0.dep.yml
generated
Normal file
BIN
.licenses/npm/@octokit/request-error-2.1.0.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/@octokit/request-error-5.0.1.dep.yml
generated
Normal file
BIN
.licenses/npm/@octokit/request-error-5.0.1.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/@octokit/request.dep.yml
generated
Normal file
BIN
.licenses/npm/@octokit/request.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/@octokit/types-12.4.0.dep.yml
generated
Normal file
BIN
.licenses/npm/@octokit/types-12.4.0.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/@octokit/types-6.41.0.dep.yml
generated
Normal file
BIN
.licenses/npm/@octokit/types-6.41.0.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/@opentelemetry/api.dep.yml
generated
Normal file
BIN
.licenses/npm/@opentelemetry/api.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/@protobuf-ts/plugin-framework.dep.yml
generated
Normal file
BIN
.licenses/npm/@protobuf-ts/plugin-framework.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/@protobuf-ts/plugin.dep.yml
generated
Normal file
BIN
.licenses/npm/@protobuf-ts/plugin.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/@protobuf-ts/protoc.dep.yml
generated
Normal file
BIN
.licenses/npm/@protobuf-ts/protoc.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/@protobuf-ts/runtime-rpc.dep.yml
generated
Normal file
BIN
.licenses/npm/@protobuf-ts/runtime-rpc.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/@protobuf-ts/runtime.dep.yml
generated
Normal file
BIN
.licenses/npm/@protobuf-ts/runtime.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/@types/node-fetch.dep.yml
generated
Normal file
BIN
.licenses/npm/@types/node-fetch.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/@types/node.dep.yml
generated
Normal file
BIN
.licenses/npm/@types/node.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/@types/tmp.dep.yml
generated
BIN
.licenses/npm/@types/tmp.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@types/tunnel.dep.yml
generated
Normal file
BIN
.licenses/npm/@types/tunnel.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/archiver-utils-2.1.0.dep.yml
generated
Normal file
BIN
.licenses/npm/archiver-utils-2.1.0.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/archiver-utils-3.0.4.dep.yml
generated
Normal file
BIN
.licenses/npm/archiver-utils-3.0.4.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/archiver.dep.yml
generated
Normal file
BIN
.licenses/npm/archiver.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/async.dep.yml
generated
Normal file
BIN
.licenses/npm/async.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/asynckit.dep.yml
generated
Normal file
BIN
.licenses/npm/asynckit.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/base64-js.dep.yml
generated
Normal file
BIN
.licenses/npm/base64-js.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/before-after-hook.dep.yml
generated
Normal file
BIN
.licenses/npm/before-after-hook.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/binary.dep.yml
generated
Normal file
BIN
.licenses/npm/binary.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/bl.dep.yml
generated
Normal file
BIN
.licenses/npm/bl.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/bottleneck.dep.yml
generated
Normal file
BIN
.licenses/npm/bottleneck.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/brace-expansion-2.0.1.dep.yml
generated
Normal file
BIN
.licenses/npm/brace-expansion-2.0.1.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/buffer-crc32.dep.yml
generated
Normal file
BIN
.licenses/npm/buffer-crc32.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/buffer.dep.yml
generated
Normal file
BIN
.licenses/npm/buffer.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/buffers.dep.yml
generated
Normal file
BIN
.licenses/npm/buffers.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/camel-case.dep.yml
generated
Normal file
BIN
.licenses/npm/camel-case.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/chainsaw.dep.yml
generated
Normal file
BIN
.licenses/npm/chainsaw.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/combined-stream.dep.yml
generated
Normal file
BIN
.licenses/npm/combined-stream.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/commander.dep.yml
generated
Normal file
BIN
.licenses/npm/commander.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/compress-commons.dep.yml
generated
Normal file
BIN
.licenses/npm/compress-commons.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/core-util-is.dep.yml
generated
Normal file
BIN
.licenses/npm/core-util-is.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/crc-32.dep.yml
generated
Normal file
BIN
.licenses/npm/crc-32.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/crc32-stream.dep.yml
generated
Normal file
BIN
.licenses/npm/crc32-stream.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/crypto.dep.yml
generated
Normal file
BIN
.licenses/npm/crypto.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/delayed-stream.dep.yml
generated
Normal file
BIN
.licenses/npm/delayed-stream.dep.yml
generated
Normal file
Binary file not shown.
Binary file not shown.
BIN
.licenses/npm/dot-object.dep.yml
generated
Normal file
BIN
.licenses/npm/dot-object.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/end-of-stream.dep.yml
generated
Normal file
BIN
.licenses/npm/end-of-stream.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/events.dep.yml
generated
Normal file
BIN
.licenses/npm/events.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/form-data.dep.yml
generated
Normal file
BIN
.licenses/npm/form-data.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/fs-constants.dep.yml
generated
Normal file
BIN
.licenses/npm/fs-constants.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/glob.dep.yml
generated
BIN
.licenses/npm/glob.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/graceful-fs.dep.yml
generated
Normal file
BIN
.licenses/npm/graceful-fs.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/ieee754.dep.yml
generated
Normal file
BIN
.licenses/npm/ieee754.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/is-plain-object.dep.yml
generated
Normal file
BIN
.licenses/npm/is-plain-object.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/isarray.dep.yml
generated
Normal file
BIN
.licenses/npm/isarray.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/jwt-decode.dep.yml
generated
Normal file
BIN
.licenses/npm/jwt-decode.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/lazystream.dep.yml
generated
Normal file
BIN
.licenses/npm/lazystream.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/lodash.defaults.dep.yml
generated
Normal file
BIN
.licenses/npm/lodash.defaults.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/lodash.dep.yml
generated
Normal file
BIN
.licenses/npm/lodash.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/lodash.difference.dep.yml
generated
Normal file
BIN
.licenses/npm/lodash.difference.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/lodash.flatten.dep.yml
generated
Normal file
BIN
.licenses/npm/lodash.flatten.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/lodash.isplainobject.dep.yml
generated
Normal file
BIN
.licenses/npm/lodash.isplainobject.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/lodash.union.dep.yml
generated
Normal file
BIN
.licenses/npm/lodash.union.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/lower-case.dep.yml
generated
Normal file
BIN
.licenses/npm/lower-case.dep.yml
generated
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user