solvaholic / octodns-sync

GitHub Action to test and deploy DNS settings with OctoDNS
MIT License
28 stars 14 forks source link

Linter runs on each push, even if same commit #29

Closed solvaholic closed 3 years ago

solvaholic commented 3 years ago

What I did

  1. Pushed changes to a branch
  2. Let Linter check pass
  3. Merged changes to main, and pushed main

What I expected to happen

  1. Linter workflow successfully checks branch
  2. Linter workflow finds its previous check and skips, on push to main

What happened instead

Linter linted again:

image

Additional info

I expect there's a normal pattern for this that I haven't learned about yet. Maybe in github/super-linter, or in Actions docs.

A similar fix could reduce the Actions run time this project spends on docker build.

Send workflow improvements upstream to solvaholic/template, as appropriate.

solvaholic commented 3 years ago

In adacc02 I configured workflows/linter.yml not to run on pushes to main:

on:
   push:
     branches-ignore:
       - 'main'

The Lint Code Base check is required before merging into main. This change should eliminate that extra run:

image