From 443dfb8365d00a164982013b14f40061f7b0ee92 Mon Sep 17 00:00:00 2001 From: srz_zumix Date: Sat, 17 Dec 2022 16:31:52 +0900 Subject: [PATCH 1/5] bundler-cache --- .github/workflows/awesome-bot.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/awesome-bot.yml b/.github/workflows/awesome-bot.yml index bbf66a0dc3..8c1dee3a49 100644 --- a/.github/workflows/awesome-bot.yml +++ b/.github/workflows/awesome-bot.yml @@ -15,11 +15,16 @@ jobs: 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 From 1b8775171d9922f2832dfb1d0209f0ca15f0a2f2 Mon Sep 17 00:00:00 2001 From: srz_zumix Date: Sat, 17 Dec 2022 17:13:30 +0900 Subject: [PATCH 2/5] update paths-ignore --- .github/workflows/gtest-compat.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/gtest-compat.yml b/.github/workflows/gtest-compat.yml index fc06ad6f4e..cae33fee56 100644 --- a/.github/workflows/gtest-compat.yml +++ b/.github/workflows/gtest-compat.yml @@ -16,6 +16,8 @@ on: - '*.yaml' - '.circleci/**' - '.semaphore/**' + - '.github/**' + - '!.github/workflows/gtest-compat.yml' push: branches: - master From cc82369b019b443da3d54f9233603f30b4417b71 Mon Sep 17 00:00:00 2001 From: srz_zumix Date: Sat, 17 Dec 2022 17:23:43 +0900 Subject: [PATCH 3/5] fix --- .ci/awesome_bot.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.ci/awesome_bot.sh b/.ci/awesome_bot.sh index 5604c8ff30..584606d21f 100755 --- a/.ci/awesome_bot.sh +++ b/.ci/awesome_bot.sh @@ -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 From a3946dc28f38e756135677bf3ce194640c962040 Mon Sep 17 00:00:00 2001 From: srz_zumix Date: Sat, 17 Dec 2022 17:32:42 +0900 Subject: [PATCH 4/5] fix --- .ci/awesome_bot.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.ci/awesome_bot.sh b/.ci/awesome_bot.sh index 584606d21f..b142f420ac 100755 --- a/.ci/awesome_bot.sh +++ b/.ci/awesome_bot.sh @@ -1,9 +1,9 @@ #!/bin/bash if type awesome_bot >/dev/null 2>&1; then - AWESOME_BOT_EXEC=awesome_bot + AWESOME_BOT_EXEC="awesome_bot" else - AWESOME_BOT_EXEC=bundle exec awesome_bot + AWESOME_BOT_EXEC="bundle exec awesome_bot" fi awesome_bot_with_retry() { From 4053c63a3aef55101dc71e2523b6c4a51c468894 Mon Sep 17 00:00:00 2001 From: srz_zumix Date: Sat, 17 Dec 2022 18:15:57 +0900 Subject: [PATCH 5/5] up --- .github/workflows/awesome-bot.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/awesome-bot.yml b/.github/workflows/awesome-bot.yml index 8c1dee3a49..6c7796098f 100644 --- a/.github/workflows/awesome-bot.yml +++ b/.github/workflows/awesome-bot.yml @@ -10,7 +10,9 @@ 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: