Skip to content

Commit

Permalink
Update artifact.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavanrajshekar authored Aug 30, 2024
1 parent d96c8af commit dfbcd57
Showing 1 changed file with 21 additions and 31 deletions.
52 changes: 21 additions & 31 deletions .github/workflows/artifact.yml
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

0 comments on commit dfbcd57

Please sign in to comment.