Skip to content

Github Actions Demo #10

Github Actions Demo

Github Actions Demo #10

name: Github Actions Demo
on:
push:
branches: [ main ]
paths-ignore: [ .github/** ]
pull_request:
branches: [ main ]
schedule:
- cron: '15 6 * * 0'
workflow_dispatch:
inputs:
environment:
type: environment
jobs:
Build:
runs-on: ubuntu-latest
steps:
- name: Echo
run: |
echo "Event: ${{ github.event_name }}"
echo "Branch: ${{ github.ref }}"
- uses: actions/[email protected]
- name: List Files
run: |
echo "${{github.repository}} contains:"
tree
Test:
needs: Build
runs-on: ubuntu-latest
if: github.event.name == "workflow_dispatch"

Check failure on line 34 in .github/workflows/github-actions-demo.yml

View workflow run for this annotation

GitHub Actions / Github Actions Demo

Invalid workflow file

The workflow is not valid. .github/workflows/github-actions-demo.yml (Line: 34, Col: 9): Unexpected symbol: '"workflow_dispatch"'. Located at position 22 within expression: github.event.name == "workflow_dispatch" .github/workflows/github-actions-demo.yml (Line: 42, Col: 9): Unexpected symbol: '"workflow_dispatch"'. Located at position 22 within expression: github.event.name == "workflow_dispatch"
environment: Test
steps:
- run: echo "Testing..."
Load-Test:
needs: Build
runs-on: ubuntu-latest
if: github.event.name == "workflow_dispatch"
environment: Load-Test
steps:
- run: |
echo "Testing..."
sleep 15