Skip to content

new update on multiworkflow #4

new update on multiworkflow

new update on multiworkflow #4

name: Build, Test and Deploy
on:
- push
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install Cowsay Program
run: sudo apt-get install cowsay -y
- name: Execute Cowsay Command
run: cowsay -f dragon "Run for cover, I am a DRAGON......RAWR" >> dragon.txt
- name: Upload Dragon File
uses: actions/upload-artifact@v4
with:
name: dragon-text-file
path: dragon.txt
test:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download Dragon File
uses: actions/download-artifact@v4
with:
name: dragon-text-file
- name: Test file exists
run: grep -i "dragon" dragon.txt
deploy:
needs: test
runs-on: ubuntu-latest
steps:
- name: Download Dragon File
uses: actions/download-artifact@v4
with:
name: dragon-text-file
- name: Read File
run: cat dragon.txt
- name: Deploy
run: echo "Deploying......."