mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-09 15:37:56 -05:00
Adjust Updater workflow to not hit master directly. (#12004)
Signed-off-by: Satadru Pramanik <satadru@gmail.com>
This commit is contained in:
committed by
GitHub
parent
ba0f660340
commit
7fc7d9cf14
3
.github/workflows/Updater.yml
vendored
3
.github/workflows/Updater.yml
vendored
@@ -22,9 +22,10 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: true
|
||||
ref: 'pre_glibc_standalone'
|
||||
- uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: '3.4.3'
|
||||
ruby-version: '3.4.4'
|
||||
- name: Install Python pip
|
||||
run: sudo apt install -y python3-pip
|
||||
- name: Install ruby-libversion # Hopefully this will get added as an Ubuntu/Debian package so we don't have to do this manually.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/local/bin/ruby
|
||||
# build_updated_packages version 2.7 (for Chromebrew)
|
||||
# build_updated_packages version 2.8 (for Chromebrew)
|
||||
# This updates the versions in python pip packages by calling
|
||||
# tools/update_python_pip_packages.rb, checks for updated ruby packages
|
||||
# by calling tools/update_ruby_gem_packages.rb, and then checks if any
|
||||
@@ -31,6 +31,13 @@ CHECK_ALL_RUBY = ARGV.include?('--check-all-ruby')
|
||||
require_gem 'highline'
|
||||
require_gem 'timeout'
|
||||
|
||||
excluded_packages = Set[
|
||||
{ pkg_name: 'glibc_fallthrough', comments: 'Stub package.' },
|
||||
{ pkg_name: 'py3_unsupported_python', commwnts: 'Stub package.' },
|
||||
{ pkg_name: 'terraform', comments: 'Needs manual update due to package structure.' }
|
||||
]
|
||||
excluded_pkgs = excluded_packages.map { |h| h[:pkg_name] }
|
||||
|
||||
def self.agree_default_yes(message = nil)
|
||||
Timeout.timeout(CREW_AGREE_TIMEOUT_SECONDS) do
|
||||
return agree_with_default("#{message} (YES/no)?", true, default: 'y')
|
||||
@@ -104,6 +111,10 @@ if CHECK_ALL_RUBY
|
||||
end
|
||||
updated_packages.push(*crew_update_packages)
|
||||
updated_packages.uniq!
|
||||
# Remove packages that don't need to be checked for updates from the
|
||||
# check list.
|
||||
exclusion_regex = "(#{excluded_pkgs.join('|')})"
|
||||
updated_packages.delete_if { |d| /#{exclusion_regex}/.match(d) }
|
||||
|
||||
updated_packages.each do |pkg|
|
||||
name = pkg.sub('packages/', '').sub('.rb', '')
|
||||
|
||||
Reference in New Issue
Block a user