scheduled workflows: fix branch, add new files.
- ensure we reset to `origin/master` so we only have the commit we care about in the PR - ensure we `git add` to include any new files - don't use `git commit -a` and instead rely only on files added with `git add`
This commit is contained in:
parent
755be7a32e
commit
235a663df0
4
.github/workflows/spdx.yml
vendored
4
.github/workflows/spdx.yml
vendored
@ -30,7 +30,9 @@ jobs:
|
|||||||
if brew update-license-data --fail-if-not-changed; then
|
if brew update-license-data --fail-if-not-changed; then
|
||||||
if ! git ls-remote --exit-code --heads origin spdx-update; then
|
if ! git ls-remote --exit-code --heads origin spdx-update; then
|
||||||
git checkout -B spdx-update
|
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"
|
echo "::set-output name=committed::true"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
6
.github/workflows/tapioca.yml
vendored
6
.github/workflows/tapioca.yml
vendored
@ -40,9 +40,11 @@ jobs:
|
|||||||
bundle exec srb rbi hidden-definitions
|
bundle exec srb rbi hidden-definitions
|
||||||
|
|
||||||
git checkout -B tapioca-update
|
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
|
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"
|
echo "::set-output name=committed::true"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user