Skip to content

Sponsors information #465

Sponsors information

Sponsors information #465

name: Bot Deployment
on:
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- "tests/**"
- ".github/**"
- ".husky/**"
- ".vscode/**"
- "README.md"
- "sonar-project.properties"
- "jest.config.ts"
- ".eslintrc.json"
- ".prettierrc"
- ".nvmrc"
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: metadata
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository }}
- uses: docker/build-push-action@v5
with:
context: .
file: ./deploy/Containerfile
push: true
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
- uses: ./.github/actions/deploy
with:
ssh_user: ci
ssh_identity: ${{ vars.deploy_target_identity }}
ssh_host: ${{ secrets.deploy_target_host }}
ssh_port: ${{ secrets.deploy_target_port }}
ssh_key: ${{ secrets.deploy_target_key }}
- uses: appleboy/telegram-action@master
with:
to: ${{ vars.alerts_chat_id }}
token: ${{ secrets.NOTIFICATION_BOT_TOKEN }}
format: markdown
message: |
🤖 New bot version was successfully deployed! [${{ github.workflow }} #${{ github.run_number }}](https://github.com/hackerembassy/hackerembassy-tg-bot/actions/workflows/app-deployment.yml)