Skip to content

Commit

Permalink
Merge 4053c63 into 9e82c86
Browse files Browse the repository at this point in the history
  • Loading branch information
srz-zumix committed Dec 17, 2022
2 parents 9e82c86 + 4053c63 commit e16f323
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
8 changes: 7 additions & 1 deletion .ci/awesome_bot.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
#!/bin/bash

if type awesome_bot >/dev/null 2>&1; then
AWESOME_BOT_EXEC="awesome_bot"
else
AWESOME_BOT_EXEC="bundle exec awesome_bot"
fi

awesome_bot_with_retry() {
local attempt_max=5
local -i attempt_num=1
until awesome_bot "$@"; do
until ${AWESOME_BOT_EXEC} "$@"; do
if ((attempt_num == attempt_max)); then
exit 1
fi
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/awesome-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,23 @@ on:
name: AsesomeBot
jobs:
check:
runs-on: ubuntu-latest
# act の場合 github.actor_id がないのでそれを利用
# act の image に libssl1.1 が入ってないので 20.04 を使う
runs-on: ${{ (github.actor_id == null && 'ubuntu-20.04') || 'ubuntu-latest' }}
env:
ASESOME_BOT_OPTION: --allow-redirect --allow-ssl --allow-dupe -t 60
steps:
- uses: actions/checkout@v3
- name: Create Gemfile
run: |
{
echo 'source "http://rubygems.org"'
echo "gem 'awesome_bot'"
} > Gemfile
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- name: install
run: gem install awesome_bot
ruby-version: 3.1
bundler-cache: true
- name: check
run: |
# shellcheck disable=SC2086
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/gtest-compat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
- '*.yaml'
- '.circleci/**'
- '.semaphore/**'
- '.github/**'
- '!.github/workflows/gtest-compat.yml'
push:
branches:
- master
Expand Down

0 comments on commit e16f323

Please sign in to comment.