Skip to content

Commit

Permalink
Update github-actions-demo.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
almeidat2 authored Sep 25, 2024
1 parent 51c8831 commit 3ac6207
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/github-actions-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ on:
schedule:
- cron: "15 6 * * SUN"
workflow_dispatch:
inputs:
environment:
description: 'Environment to deploy to'
type: environment
required: true

jobs:
Build:
Expand All @@ -28,4 +33,46 @@ jobs:

- name: List all file in repository
run: tree -a

Test:
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch'
needs: Build
environment: Test
steps:
- run: echo "πŸ§ͺ Testing..."

Load-Test:
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch'
needs: Build
environment: Load-Test
steps:
- run: |
echo "πŸ§ͺ Testing..."
sleep 15
Production:
runs-on: ubuntu-latest
needs: [Test, Load-Test]
environment:
name: Production
url: https://writeabout.net
if: github.event.inputs.environment == 'Production'
steps:
- run: |
echo "πŸš€ Step 1..."
sleep 10
- run: |
echo "πŸš€ Step 2..."
sleep 10
- run: |
echo "πŸš€ Step 3..."
sleep 10
- run: |
echo "πŸš€ Step 4..."
sleep 10
- run: |
echo "πŸš€ Step 5..."
sleep 10

0 comments on commit 3ac6207

Please sign in to comment.