Skip to content

Commit

Permalink
fix broadcast environment
Browse files Browse the repository at this point in the history
  • Loading branch information
amiremohamadi committed May 28, 2024
1 parent 8437114 commit ef79f03
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/broadcast.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
jobs:
broadcast:
runs-on: ubuntu-latest
environment: {{ github.event.inputs.environment }}
environment: broadcast

steps:
- name: Checkout code
Expand All @@ -27,8 +27,19 @@ jobs:
run: pip install -r ./tools/requirements.txt

- name: notify
run: ./tools/notify.sh
run: |
if [ "${{ github.event.inputs.environment }}" == "test" ]; then
echo "setting up test environment"
echo "CHAT_ID=${{ vars.CHAT_ID }}" >> $GITHUB_ENV
echo "TEST=1" >> $GITHUB_ENV
else
echo "setting up production environment"
echo "CHAT_ID=${{ vars.CHAT_ID }}" >> $GITHUB_ENV
echo "TEST=0" >> $GITHUB_ENV
fi
./tools/notify.sh
env:
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
CHAT_ID: ${{ vars.CHAT_ID }}
TEST: 0
CHAT_ID: ${{ env.CHAT_ID }}
TEST: ${{ env.TEST }}
17 changes: 17 additions & 0 deletions content/events/test/info.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: "جلسه ۱۷"
date: 2024-04-16T00:00:00+04:30
layout: event
type: event
eventNumber: 17
eventDate: 1403-01-29
startTime: '18:00'
endTime: 21:00
address: "خیابان غفاری، پارک علم و فناوری"
registerLink: https://evand.com/events/birjandlug-17
speakers: [محمد زارع مقدم, محمد مهدی محمدی]
topics: [linux, anti-patterns]
lat: 32.845253
lng: 59.229300
locations: [پارک علم و فناوری]
---
Binary file added static/events/poster/test/test.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ef79f03

Please sign in to comment.