Github Actions

And how to get there from                        

"on:" – when should I run

on:
  pull_request:
  push:
    paths-ignore:
      - 'web/**'
    branches:
      - master
      - dev

Run on all pull requests

Run on push...

But only if there is changes
outside the web folder

And only run if in master or dev branch

Running npm scripts

Installing private packages

jobs:
  test:
    steps:
      - name: Set NPM token
        env: 
  NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Yarn add private packages run: yarn install  


Running only on branch X

on:
  pull_request:
  push:
    branches:
      - master

Run only if other job succeeds

jobs:
  job1:
  job2:
    needs: job1
  job3:
    needs: [job1, job2]

Run only if some files changed

on:
  push:
    paths-ignore:
      - 'docs/**'
on:
  push:
    paths:
      - 'packages/web/**'

Using Postgres dependency

jobs:
  test:
    services:
      postgres:
        image: postgres
        env:
          POSTGRES_USER: postgres
          POSTGRES_PASSWORD: postgres_pass
          POSTGRES_DB: database_name
        ports:
          - 5432:5432

Manual jobs

Made with Slides.com