'How to ignore rebase pushes in Github Actions?

Is there a way to not run a workflow when you force push after a rebase? I use the on push syntax but would like it to only run when a push contains at least one new commit

Example which triggers when you force push after a rebase:

on:
  push:
    branches: [ dev/* ]


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source