Skip to content

Commit

Permalink
Merge pull request #11 from philips-labs/multiple-artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
Brend-Smits committed Sep 14, 2021
2 parents 3995929 + 6081c48 commit 7861ea3
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/example-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,39 @@ name: Create a provenance
on:
workflow_dispatch:
inputs:
text_input:
ingredient_input:
description: 'Ingredient to input in the artifact text file'
required: false
car_input:
description: 'Car to input in the artifact text file'
required: false

jobs:
build:
name: Build artifact
runs-on: ubuntu-latest
steps:
# traditionally you would build your code here and generate an artifact
- name: Create artifact
- name: Create first artifact
run: echo "onion, tomato, jalapeno, cilantro, lime, salt" > salsa.txt

- name: Create second artifact
run: echo "audi, tesla, bmw" > cars.txt

- name: Input workflow ingredient
if: ${{ github.event.inputs.text_input != '' }}
if: ${{ github.event.inputs.ingredient_input != '' }}
run: |
echo ", ${{github.event.inputs.ingredient_input}}" >> salsa.txt
- name: Input workflow cars
if: ${{ github.event.inputs.car_input != '' }}
run: |
echo ", ${{github.event.inputs.text_input}}" >> salsa.txt
echo ", ${{github.event.inputs.car_input}}" >> cars.txt
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
path: salsa.txt
path: '*.txt'

generate-provenance:
needs: build
Expand Down

0 comments on commit 7861ea3

Please sign in to comment.