Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Github Actions tricks

How to make a container image public

Only run a workflow when there are changes in a specified directory

on:
  push:
    branches: [ "main", "master"]
    paths: [ "name-of-dir"]
  pull_request:
    branches: [ "main", "master" ]
    paths: [ "name-of-dir"]
  workflow_dispatch:

or

name: ansible-lint
on:
 workflow_dispatch:
 push:
   branches: ["*"]
   paths: "ansible/**"