Skip to content

another-job

another-job #6

name: Fifteen workflow
on: [push]
jobs:
run-first-commnads:
runs-on: ubuntu-latest
steps:
- name: MAth expression
run: expr 1 + 1 > math.txt
- name: UPload math file
uses: actions/upload-artifact@v3
with:
name: math.txt
path: math.txt
another-job:
runs-on: ubuntu-latest
needs: [run-first-commnads]
steps:
- name: Download math file
uses: actions/download-artifact@v3
with:
name: math.txt
- name: MAth expression
run: |
value=`cat math.txt`
expr $value \* 25 > math.txt
- name: UPload math file
uses: actions/upload-artifact@v3
with:
name: math.txt
path: math.txt
second-job:
runs-on: ubuntu-latest
needs: [another-job]
steps:
- name: Download math file
uses: actions/download-artifact@v3
with:
name: math.txt
- name: Read math file
run: cat math.txt