Skip to content

exercise 4 workflow.yaml creation #3

exercise 4 workflow.yaml creation

exercise 4 workflow.yaml creation #3

Workflow file for this run

name: Protected envs and stages
on:
push:
branches:
- master
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout github repository
uses: actions/checkout@v4
- name: Build or simulate building
run: sleep 5
- name: Finish building
run: echo "Build completed successfully"
deploy:
runs-on: ubuntu-latest
needs: [build-and-push]
strategy:
matrix:
environment: ['dev', 'int']
environment: ${{ matrix.environment}}
steps:
- name: Checkout github repository
uses: actions/checkout@v4
- name: Print environment
run: echo "Deploying to environment ${{ matrix.environment}}"
- name: Simulate deployment
run: sleep 5
- name: Finish deployment
run: echo "Deployment completed successfully"