Skip to content
This repository was archived by the owner on Jan 13, 2026. It is now read-only.

Merge branch 'main' of github.com:helmcode/oncall-slack-bot #4

Merge branch 'main' of github.com:helmcode/oncall-slack-bot

Merge branch 'main' of github.com:helmcode/oncall-slack-bot #4

Workflow file for this run

name: OnCall Bot CI/CD
on:
push:
branches: [ main, master ]
workflow_dispatch:
env:
REGISTRY: docker.io
IMAGE_NAME: barckcode/oncall-slack-bot
VERSION: "1.0.4"
jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies and test
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
# Basic syntax check
python -m py_compile main.py
python -m py_compile handlers/commands.py
python -m py_compile services/postgres_storage.py
- name: Log in to Container Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
- name: Update Helm chart
run: |
# Update image tag in values.yaml
sed -i "s|repository: .*|repository: ${{ env.IMAGE_NAME }}|" helm/oncall-slack-bot/values.yaml
sed -i "s/tag: \".*\"/tag: \"${{ env.VERSION }}\"/" helm/oncall-slack-bot/values.yaml
# Update chart version
sed -i "s/version: .*/version: ${{ env.VERSION }}/" helm/oncall-slack-bot/Chart.yaml
sed -i "s/appVersion: .*/appVersion: \"${{ env.VERSION }}\"/" helm/oncall-slack-bot/Chart.yaml
- name: Commit changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
if git diff --quiet; then
echo "No changes to commit"
exit 0
fi
git add helm/oncall-slack-bot/values.yaml helm/oncall-slack-bot/Chart.yaml
git commit -m "🚀 Update to version ${{ env.VERSION }}"
git push
- name: Deploy summary
run: |
echo "✅ Deployment completed!"
echo "🐳 Image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }}"
echo "📦 ArgoCD will deploy automatically"