Master GitHub Actions with hands-on labs and exercises. Learn how to automate workflows, run tests, deploy applications, and more using GitHub's powerful automation platform. This repository has everything you need to get started with continuous integration and continuous deployment.
name: YAML Syntax
on:
workflow_dispatch:
push:
branches:
- main
jobs:
initial:
runs-on: ubuntu-latest
steps:
- run: echo "This job will be run first."
fanout1:
runs-on: ubuntu-latest
needs: initial
steps:
- run: echo "This job will run after the initial job, in parallel with fanout2."
fanout2:
runs-on: ubuntu-latest
needs: initial
steps:
- run: echo "This job will run after the initial job, in parallel with fanout1."
fanout3:
runs-on: ubuntu-latest
needs: fanout1
steps:
- run: echo "This job will run after the initial job, in parallel with fanout2."
fanin:
runs-on: ubuntu-latest
needs: [fanout1, fanout2]
steps:
- run: echo "This job will run after fanout1 and fanout2 have finished."
build:
runs-on: ubuntu-latest
strategy:
matrix:
configuration: [debug, release]
steps:
- run: echo "This job builds the cofiguration $."
test:
runs-on: ubuntu-latest
needs: build
steps:
- run: echo "This job will be run after the build job."
ring01:
runs-on: ubuntu-latest
needs: test
steps:
- run: echo "This job will be run after the test job."
ring02:
runs-on: macos-latest
needs: test
steps:
- run: echo "This job will be run after the test job."
ring03:
runs-on: ubuntu-latest
needs: test
steps:
- run: echo "This job will be run after the test job."
ring04:
runs-on: ubuntu-latest
needs: [ring01, ring02, ring03]
steps:
- run: echo "This job will be run after the ring01,ring02,ring03 jobs."
prod:
runs-on: ubuntu-latest
needs: [ring04]
steps:
- run: echo "This job will be run after the ring04 job."