diff --git a/.github/workflows/spdx.yml b/.github/workflows/spdx.yml index 35972a5ac0..4df41d32bd 100644 --- a/.github/workflows/spdx.yml +++ b/.github/workflows/spdx.yml @@ -30,7 +30,9 @@ jobs: if brew update-license-data --fail-if-not-changed; then if ! git ls-remote --exit-code --heads origin spdx-update; then git checkout -B spdx-update - git commit -am "spdx: update license data." -m "Autogenerated by [a scheduled GitHub Action](https://github.com/Homebrew/brew/blob/master/.github/workflows/spdx.yml)." + git reset origin/master + git add data/spdx + git commit -m "spdx: update license data." -m "Autogenerated by [a scheduled GitHub Action](https://github.com/Homebrew/brew/blob/master/.github/workflows/spdx.yml)." echo "::set-output name=committed::true" fi fi diff --git a/.github/workflows/tapioca.yml b/.github/workflows/tapioca.yml index 6d228918fe..f883c94c53 100644 --- a/.github/workflows/tapioca.yml +++ b/.github/workflows/tapioca.yml @@ -40,9 +40,11 @@ jobs: bundle exec srb rbi hidden-definitions git checkout -B tapioca-update - if ! git diff --exit-code -- sorbet; then + git reset origin/master + git add sorbet + if ! git --no-patch --exit-code HEAD -- sorbet; then if ! git ls-remote --exit-code --heads origin tapioca-update; then - git commit -am "sorbet: update RBI files using Tapioca." -m "Autogenerated by [a scheduled GitHub Action](https://github.com/Homebrew/brew/blob/master/.github/workflows/tapioca.yml)." + git commit -m "sorbet: update RBI files using Tapioca." -m "Autogenerated by [a scheduled GitHub Action](https://github.com/Homebrew/brew/blob/master/.github/workflows/tapioca.yml)." echo "::set-output name=committed::true" fi fi