Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added schedule for MM notification and Official Web News #141

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/createWebNews.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
- Official
default: "Beta"

schedule:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Schedule is OK, but how do we choose if it's BETA or LIVE?

A better approach would be to release BETA @10 for example, followed by LIVE news release @11.

The release @11 can be done if spreadsheet text for that date has a specific text (confirmed/released whatever).

- cron: "59 10 * * 1-5" # 10:59 AM, Monday through Friday

jobs:
post_news:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -69,7 +72,7 @@ jobs:
--data-urlencode "body=$MESSAGE"

- name: Post message on Official Website
if: ${{ github.event.inputs.select_web == 'Official' }}
if: ${{ github.event.inputs.select_web == 'Official' || github.event_name == 'schedule' }}
env:
MIKROE_OFFICIAL_URL: ${{ secrets.MIKROE_OFFICIAL_URL }}
run: |
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/notify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ on:
description: Notify Boards/Cards
default: false

schedule:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Schedule is OK, but how do we select the values here?

Which values shall be passed to script?

- cron: "0 11 * * 1-5" # 11:00 AM, Monday through Friday

jobs:
notify:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -62,12 +65,12 @@ jobs:
$MATTERMOST_WEBHOOK_URL

- name: Build Boards/Cards Message with Python
if: ${{ github.event.inputs.notify_components == 'true' }}
if: ${{ github.event.inputs.notify_components == 'true' || github.event_name == 'schedule' }}
run: |
python -u scripts/build_message.py > message.txt

- name: Send Boards/Cards notification to Mattermost
if: ${{ github.event.inputs.notify_components == 'true' }}
if: ${{ github.event.inputs.notify_components == 'true' || github.event_name == 'schedule' }}
env:
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
run: |
Expand Down