Skip to content

Weekly Eventing WG Office Hours Slack Reminder #109

Weekly Eventing WG Office Hours Slack Reminder

Weekly Eventing WG Office Hours Slack Reminder #109

# Copyright 2024 The Knative Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: 'Weekly Eventing WG Office Hours Slack Reminder'
on:
workflow_dispatch:
schedule:
- cron: 0 14 * * 4 # 1 hour before the meeting time
jobs:
remind:
name: weekly-eventing-office-hours-reminder
runs-on: 'ubuntu-latest'
steps:
- name: Check if this is an on-week
id: check-week
run: |
# Calculate week number (ISO 8601)
WEEK_NUM=$(date +%V)
# Run on odd weeks only
if [ $((WEEK_NUM % 2)) -eq 1 ]; then
echo "should_run=true" >> $GITHUB_OUTPUT
else
echo "should_run=false" >> $GITHUB_OUTPUT
fi
- name: Post reminder to Slack
if: steps.check-week.outputs.should_run == 'true'
uses: rtCamp/action-slack-notify@v2.3.3
env:
SLACK_ICON: https://github.com/knative.png?size=48
SLACK_USERNAME: github-actions
SLACK_TITLE: Knative Eventing Office Hours Reminder
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
MSG_MINIMAL: 'true'
SLACK_CHANNEL: 'knative-eventing'
SLACK_MESSAGE: "This is a friendly reminder that the Knative Eventing Office Hours start in 1 hour. We hope to see you there! Please join the zoom meeting: https://zoom.us/j/92717482035?pwd=SnBiWnl6MXRvcUNFWHZ4Wkt5Z0FYZz09"