Added artifctory to upload and download files #11
This file contains hidden or 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
| name: multiple jobs | |
| on: push | |
| jobs: | |
| build_job_1: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Execute cowsay Program | |
| run: sudo apt-get install cowsay -y | |
| - name: execute cowsay cmd | |
| run: cowsay -f dragon "Run for cover, I am dragon" >> dragon.txt | |
| - name: Upload to artifactory | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dragon-text-file | |
| path: dragon.txt | |
| test_job_2: | |
| needs: build_job_1 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: download to artifactory | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: dragon-text-file | |
| - name: Test file exist | |
| run: grep -i "dragon" dragon.txt | |
| deploy_job_2: | |
| needs: test_job_2 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: download to artifactory | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: dragon-text-file | |
| - name: Read file | |
| run: cat dragon.txt | |
| - name: deploy | |
| run: echo deploying .......... |