Fix syncing top-level `.github` files. (#87543)

This commit is contained in:
Markus Reiter 2020-08-13 02:04:25 +02:00 committed by GitHub
parent 15ba0cb966
commit d9e1309717
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 4 deletions

View File

@ -41,6 +41,8 @@ CASK_REPOS.each do |repo|
[
'.editorconfig',
'.gitattributes',
'.github/*.md',
'.github/*.yml',
'.github/actions/{automerge,checkout_cask_pr}/**/*',
'.github/ISSUE_TEMPLATE/*.md',
'.github/workflows/{automerge,ci,old-ci}.yml',
@ -90,8 +92,11 @@ CASK_REPOS.each do |repo|
end
puts
puts 'Pushing changes…'
git '-C', repo_dir.to_s, 'push', 'origin', 'master'
puts
if ENV["GITHUB_REF"] == "refs/heads/master"
puts 'Pushing changes…'
git '-C', repo_dir.to_s, 'push', 'origin', 'master'
puts
else
puts 'Would push changes…'
end
end