Skip to content

Commit

Permalink
add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
hexylena committed Nov 17, 2021
1 parent 5bf2295 commit 8ec26b1
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/matrix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Send news to Matrix

on:
schedule:
# * is a special character in YAML so you have to quote this string
# We'll run this daily at noon.
- cron: '0 12 * * *'
workflow_dispatch:

jobs:
runner-job:
if: github.repository_owner == 'galaxyproject'
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

# BEGIN Dependencies
- uses: ruby/setup-ruby@v1
with:
ruby-version: "2.5"
# END Dependencies

- name: Send announcements to matrix
run: |
commit=$(git log --since "24 hours ago" --format=%H | tail -n 1)
ruby bin/news.rb -p "${commit}~1" --matrix-post
env:
MATRIX_ACCESS_TOKEN: ${{ github.matrix_access_token }}

0 comments on commit 8ec26b1

Please sign in to comment.