Skip to content

Commit

Permalink
Add env variables to send notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
Stell0 committed Mar 13, 2024
1 parent dd947d7 commit 7375902
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 5 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/cron-run.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Docker Image Build and run

on:
schedule:
- cron: '19 19 * * *'
jobs:

build:

runs-on: ubuntu-latest

steps:
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Run the Docker container
env:
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
run: docker run stell0/financealerts:latest
33 changes: 33 additions & 0 deletions .github/workflows/image-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Docker Image Build and run

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: stell0/financealerts:latest
- name: Run the Docker container
env:
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
run: docker run stell0/financealerts:latest

Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
name: Docker Image Build and run

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '19 19 * * *'
jobs:

build:
Expand All @@ -26,7 +22,7 @@ jobs:
uses: docker/build-push-action@v5
with:
push: true
tags: stell0/financealerts:latest
tags: stell0/financealerts:S(date +%s)
- name: Run the Docker container
run: docker run stell0/financealerts:latest

0 comments on commit 7375902

Please sign in to comment.