Fix Gitea Actions runner not working with private host
This commit is contained in:
@@ -6,13 +6,7 @@
|
||||
working_directory = node["gitea"]["working_directory"]
|
||||
gitea_credentials = data_bag_item("credentials", "gitea")
|
||||
runners = gitea_credentials["runners"]
|
||||
|
||||
begin
|
||||
gitea_host = search(:node, "role:gitea").first["knife_zero"]["host"]
|
||||
rescue
|
||||
Chef::Log.warn('No server with "gitea" role. Stopping here.')
|
||||
return
|
||||
end
|
||||
gitea_host = "https://#{node["gitea"]["domain"]}"
|
||||
|
||||
apt_repository 'docker' do
|
||||
uri 'https://download.docker.com/linux/ubuntu'
|
||||
@@ -52,7 +46,7 @@ runners.each do |runner|
|
||||
code <<-EOF
|
||||
act_runner register \
|
||||
--no-interactive \
|
||||
--instance http://#{gitea_host}:#{node["gitea"]["port"]} \
|
||||
--instance #{gitea_host} \
|
||||
--name #{runner_name} \
|
||||
--token #{runner["token"]}
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user