mirror of
https://github.com/actions/upload-artifact.git
synced 2025-04-21 02:31:20 +00:00
Update action.yml
This commit is contained in:
parent
3cea537223
commit
b7d80ff574
119
action.yml
119
action.yml
@ -1,28 +1,95 @@
|
|||||||
name: 'Upload a Build Artifact'
|
on:
|
||||||
description: 'Upload a build artifact that can be used by subsequent workflow steps'
|
workflow_dispatch:
|
||||||
author: 'GitHub'
|
push:
|
||||||
inputs:
|
branches:
|
||||||
name:
|
- main
|
||||||
description: 'Artifact name'
|
|
||||||
default: 'artifact'
|
|
||||||
path:
|
|
||||||
description: 'A file, directory or wildcard pattern that describes what to upload'
|
|
||||||
required: true
|
|
||||||
if-no-files-found:
|
|
||||||
description: >
|
|
||||||
The desired behavior if no files are found using the provided path.
|
|
||||||
|
|
||||||
Available Options:
|
name: Synchronized jobs
|
||||||
warn: Output a warning but do not fail the action
|
|
||||||
error: Fail the action with an error message
|
|
||||||
ignore: Do not output any warnings or errors, the action does not fail
|
|
||||||
default: 'warn'
|
|
||||||
retention-days:
|
|
||||||
description: >
|
|
||||||
Duration after which artifact will expire in days. 0 means using default retention.
|
|
||||||
|
|
||||||
Minimum 1 day.
|
jobs:
|
||||||
Maximum 90 days unless changed from the repository settings page.
|
first:
|
||||||
runs:
|
name: First
|
||||||
using: 'node16'
|
runs-on: ubuntu-latest
|
||||||
main: 'dist/index.js'
|
strategy:
|
||||||
|
matrix:
|
||||||
|
build: ['stable', 'beta']
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Setup git config
|
||||||
|
run: |
|
||||||
|
git config user.name boop
|
||||||
|
git config user.email beep@bop.baap
|
||||||
|
- name: Change my file
|
||||||
|
run: |
|
||||||
|
mkdir -p sync
|
||||||
|
rm -f sync/first-${{ matrix.build }}
|
||||||
|
echo ${{ github.run_id }} > sync/first-${{ matrix.build }}
|
||||||
|
- name: Create a patch file
|
||||||
|
run: |
|
||||||
|
git add sync/first-${{ matrix.build }}
|
||||||
|
git commit -m 'Modified sync/first-${{ matrix.build }}'
|
||||||
|
git format-patch -1 --output=first-${{ matrix.build }}.patch
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: first-${{ matrix.build }}.patch
|
||||||
|
path: first-${{ matrix.build }}.patch
|
||||||
|
if-no-files-found: error
|
||||||
|
retention-days: 1
|
||||||
|
|
||||||
|
second:
|
||||||
|
name: Second
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
build: ['stable', 'beta']
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Setup git config
|
||||||
|
run: |
|
||||||
|
git config user.name boop
|
||||||
|
git config user.email beep@bop.baap
|
||||||
|
- name: Change my file
|
||||||
|
run: |
|
||||||
|
mkdir -p sync
|
||||||
|
rm -f sync/second-${{ matrix.build }}
|
||||||
|
echo ${{ github.run_id }} > sync/second-${{ matrix.build }}
|
||||||
|
- name: Create a patch file
|
||||||
|
run: |
|
||||||
|
git add sync/second-${{ matrix.build }}
|
||||||
|
git commit -m 'Modified sync/second-${{ matrix.build }}'
|
||||||
|
git format-patch -1 --output=second-${{ matrix.build }}.patch
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: second-${{ matrix.build }}.patch
|
||||||
|
path: second-${{ matrix.build }}.patch
|
||||||
|
if-no-files-found: error
|
||||||
|
retention-days: 1
|
||||||
|
|
||||||
|
push:
|
||||||
|
name: Push
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [first, second]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Setup git config
|
||||||
|
run: |
|
||||||
|
git config user.name boop
|
||||||
|
git config user.email beep@bop.baap
|
||||||
|
- uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: first-beta.patch
|
||||||
|
- uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: first-stable.patch
|
||||||
|
- uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: second-beta.patch
|
||||||
|
- uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: second-stable.patch
|
||||||
|
Loading…
Reference in New Issue
Block a user