Skip to content

Commit

Permalink
update worksflows
Browse files Browse the repository at this point in the history
  • Loading branch information
adidoesnt committed Feb 4, 2024
1 parent 49a78d4 commit 2260e8e
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion .github/workflows/deploy-telegram-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,34 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Install Heroku CLI
run: |
curl https://cli-assets.heroku.com/install-ubuntu.sh | sh
- name: Login to Heroku Container Registry
run: docker login --username=${{ secrets.HEROKU_EMAIL }} --password=$HEROKU_API_KEY registry.heroku.com
run: heroku container:login
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}

- name: Check if Heroku app exists
id: check_app
run: |
if heroku apps:info echofinder-telegram > /dev/null 2>&1; then
echo "App exists"
echo "::set-output name=exists::true"
else
echo "App does not exist"
echo "::set-output name=exists::false"
fi
env:
HEROKU_APP_NAME: echofinder-telegram
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}

- name: Create Heroku app
if: steps.check_app.outputs.exists == 'false'
run: heroku apps:create echofinder-telegram
env:
HEROKU_APP_NAME: echofinder-telegram
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}

- name: Build Docker image
Expand Down

0 comments on commit 2260e8e

Please sign in to comment.