forked from kodekloudhub/github-actions-artifacts-hands-on
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d96c8af
commit dfbcd57
Showing
1 changed file
with
21 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,27 @@ | ||
name: Workflow Demo | ||
|
||
on: [push] | ||
|
||
name: Workflow Demo | ||
'on': | ||
- push | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Create a text file | ||
run: echo "Hello, world!" > hello.txt | ||
|
||
- name: Archive text file | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: hello-artifact | ||
path: hello.txt | ||
|
||
download: | ||
runs-on: ubuntu-latest | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Create a text file | ||
run: 'echo "Hello, world!" > hello.txt' | ||
- name: Archive text file | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: hello-artifact | ||
path: hello.txt | ||
download: #added | ||
needs: build | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Download artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: hello-artifact | ||
path: ./artifacts | ||
|
||
- name: Display file content | ||
run: cat ./artifacts/hello.txt | ||
- name: Download text file | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: hello-artifact | ||
path: ./artifacts | ||
- name: Display content of the text file | ||
run: cat ./artifacts/hello.txt |