diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index f9ceb5d..6dfddc9 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -9,11 +9,56 @@ on: schedule: - cron: '15 6 * * 0' workflow_dispatch: + inputs: + environment: + description: 'Environment to deploy to' + type: environment + required: true jobs: - job1: + job-Build: name: Build runs-on: ubuntu-latest steps: - name: Step run: echo 'Test' + job-Test: + name: Test + runs-on: ubuntu-latest + if: github.event_name == 'workflow_dispatch' + needs: job-Build + environment: Test + steps: + - run: echo "๐Ÿงช Testing..." + job-Load-Test: + runs-on: ubuntu-latest + if: github.event_name == 'workflow_dispatch' + needs: job-Build + environment: Load-Test + steps: + - run: | + echo "๐Ÿงช Testing..." + sleep 15 + job-Production: + runs-on: ubuntu-latest + needs: [job-Test, job-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