get latest Thunderbird desktop questions #25776
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake | |
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby | |
name: get latest Thunderbird desktop questions | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '15,55 * * * *' | |
jobs: | |
scheduled: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Ruby | |
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, | |
# change this to (see https://github.com/ruby/setup-ruby#versioning): | |
# uses: ruby/setup-ruby@v1 | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
cache-version: 3 | |
ruby-version: '3.2' | |
- name: Install dependencies | |
run: |- | |
bundle install | |
- name: Get Thunderbird questions | |
run: |- | |
timestamp=$(date --utc) | |
echo "\"${timestamp}\" +%Y" | |
bundle exec ./get_answers_for_last_2_days_and_1_of_last_12.rb | |
- name: Commit and push if it changed | |
run: |- | |
git config user.name "Automated" | |
git config user.email "actions@users.noreply.github.com" | |
git add -A | |
timestamp=$(date -u) | |
git commit -m "Latest Thunderbird desktop questions: ${timestamp}" || exit 0 | |
git push |