continue-on-error を使う方法を新たに記事にしました。 以下の内容は非推奨です。参考として残しておきます。 GitHub Actions で変更があるときだけ git commit & push する方法を 2 種類。 方法 1 : シェルスクリプト完結 通常のシェルスクリプトの if ! git diff --exit-code --quiet で判定。 steps: - uses: actions/checkout@v2 - name: 変更があるかもしれないしないかもしれない run: ./script.sh - name: commit & push run: | git add -N . # 新規ファイルを含める if ! git diff --exit-code --quiet then git config user.name github-actions g