-
Notifications
You must be signed in to change notification settings - Fork 922
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5045 from galaxyproject/formfix
[Actions] Split news and recordings google form processing
- Loading branch information
Showing
3 changed files
with
76 additions
and
1 deletion.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
.github/workflows/google-form.yml → .github/workflows/google-form-news.yml
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: "[Cron] Update recordings from Google Form" | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '42 10 * * *' | ||
jobs: | ||
runner-job: | ||
runs-on: ubuntu-latest | ||
# Only run on main repo on and PRs that match the main repo. | ||
if: | | ||
github.repository == 'galaxyproject/training-material' && | ||
(github.event_name != 'pull_request' || | ||
github.event.pull_request.head.repo.full_name == github.repository) | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
# BEGIN Dependencies | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: "3.2" | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
vendor/bundle | ||
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-gems- | ||
- name: Install dependencies | ||
run: | | ||
gem install bundler | ||
bundle config path vendor/bundle | ||
bundle install --jobs 4 --retry 3 | ||
bundle pristine ffi | ||
# END Dependencies | ||
|
||
- name: Update recordings from Google Form | ||
id: recordings | ||
run: | | ||
echo "new_recordings=$(bundle exec ruby bin/google-form-recordings.rb)" >> $GITHUB_OUTPUT | ||
- name: Create Pull Request for Recordings | ||
# If it's not a Pull Request then commit any changes as a new PR. | ||
if: | | ||
github.event_name != 'pull_request' && | ||
steps.generate.outputs.new_recordings == 'true' | ||
uses: peter-evans/create-pull-request@v3 | ||
with: | ||
title: "[Google Form] New Recording Submission!" | ||
branch-suffix: timestamp | ||
commit-message: add new recording from Google Form submission | ||
add-paths: topics/ | ||
committer: "Saskia Hiltemann <[email protected]>" | ||
author: "Saskia Hiltemann <[email protected]>" | ||
body: | | ||
New recording submitted! | ||
**Submission Process checklist** | ||
- [x] **Instructor** Record video | ||
- [x] **Instructor** Submit video via form | ||
- [x] **GTN** Pull request made by bot | ||
- [ ] **GTN** Check if adjustments to PR are necessary | ||
- [ ] Check [Submissions Form](https://docs.google.com/spreadsheets/d/1iXjLlMEH5QMAMyUMHi1c_Lb7OiJhL_9hgJrtAsBoZ-Y/edit?usp=sharing) | ||
- [ ] New contributors need to be added? | ||
- [ ] **GTN** Upload video to [GalaxyProject YouTube](https://www.youtube.com/c/galaxyproject) | ||
- [ ] **GTN** Add youtube video id to PR after upload | ||
- [ ] **GTN** Put Autogenerated captions in Google Doc ([folder](https://drive.google.com/drive/folders/1liyqDQDbxMNXvpQIaqFmoE2fB2aJIH9N?usp=drive_link)) | ||
- [ ] **Instructor** Fix autogenerated captions, comment here when done | ||
- [ ] **GTN** Upload fixed captions to YouTube | ||
- [ ] **GTN** Add the people who did the captioning to this PR | ||
- [ ] **GTN** Merge PR! | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,4 +91,5 @@ | |
|
||
end | ||
|
||
STDERR.puts "new recordings: #{new_recordings}" | ||
puts new_recordings |