From 900c77c00d16f30300c349c6d9480b0c9b971832 Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Wed, 18 Nov 2020 22:44:06 +0800 Subject: [PATCH] Update GitHub action schedule to every 2nd hover --- .github/workflows/tweet.yml | 30 ++++++++++++++++-------------- README.md | 2 +- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/tweet.yml b/.github/workflows/tweet.yml index 0b75404..e148ff9 100644 --- a/.github/workflows/tweet.yml +++ b/.github/workflows/tweet.yml @@ -2,21 +2,23 @@ name: tweet on: schedule: - - cron: '42 10 * * *' # Tweet every 18:42 (GMT +8) - + - cron: "0 1/2 * * *" # Tweet every 2nd hover + push: + branches: + - main jobs: tweet: runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v1 - - name: Setup ruby - uses: eregon/use-ruby-action@master - with: - ruby-version: 2.7 - - name: Install Dependencies - run: | - gem install bundler - bundle install --jobs 4 --retry 3 - - name: Build - run: | - ruby relay.rb + - uses: actions/checkout@v1 + - name: Setup ruby + uses: eregon/use-ruby-action@master + with: + ruby-version: 2.7 + - name: Install Dependencies + run: | + gem install bundler + bundle install --jobs 4 --retry 3 + - name: Build + run: | + ruby relay.rb diff --git a/README.md b/README.md index 84e079d..768fde1 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Twitter Bot for Ruby China -![tweet](https://github.com/ruby-china/twitter-bot/workflows/tweet/badge.svg) +[![tweet](https://github.com/ruby-china/twitter-bot/workflows/tweet/badge.svg)](https://github.com/ruby-china/twitter-bot/actions?query=workflow%3Atweet) Relay Excellent Posts from [Ruby China](https://ruby-china.org) to [Ruby China Twitter](https://twitter.com/ruby_china)