From 74d5795e83df03af9a23a89f382d3a61ccad80fc Mon Sep 17 00:00:00 2001 From: abdullah tahir <144704533+bllo-1@users.noreply.github.com> Date: Fri, 13 Sep 2024 12:56:25 +0300 Subject: [PATCH] Update artifact.yml --- .github/workflows/artifact.yml | 39 ++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/.github/workflows/artifact.yml b/.github/workflows/artifact.yml index 4d356aa5..c973e324 100644 --- a/.github/workflows/artifact.yml +++ b/.github/workflows/artifact.yml @@ -1,20 +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@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 \ No newline at end of file + - 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: 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