mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
46 lines
1.3 KiB
YAML
46 lines
1.3 KiB
YAML
name: ci
|
|
|
|
on:
|
|
push:
|
|
|
|
jobs:
|
|
docker:
|
|
name: Build Docker image
|
|
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v3
|
|
-
|
|
name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v2
|
|
-
|
|
name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
-
|
|
name: Login to Registry
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: ${{ secrets.REGISTRY_URL }}
|
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
-
|
|
name: Get short commit SHA
|
|
id: commit_sha
|
|
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
|
-
|
|
name: Build and push
|
|
uses: docker/build-push-action@v4
|
|
with:
|
|
platforms: linux/amd64
|
|
push: ${{ github.ref == 'refs/heads/dev' }}
|
|
tags: ${{ secrets.REGISTRY_URL }}/west/telegram-bot:latest,
|
|
${{ secrets.REGISTRY_URL }}/west/telegram-bot:${{ steps.commit_sha.outputs.sha_short }}
|
|
#-
|
|
# name: Redeploy container
|
|
# uses: fjogeleit/http-request-action@v1
|
|
# if: ${{ github.ref == 'refs/heads/dev' }}
|
|
# with:
|
|
# url: ${{ secrets.CONTAINER_WEBHOOK }}
|
|
# method: 'POST' |