mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
39 lines
1.1 KiB
YAML
39 lines
1.1 KiB
YAML
name: ci
|
|
|
|
on:
|
|
push:
|
|
|
|
jobs:
|
|
docker:
|
|
name: Build Docker image
|
|
|
|
runs-on: [self-hosted, linux, ARM64]
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v2
|
|
-
|
|
name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v1
|
|
-
|
|
name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
-
|
|
name: Login to Registry
|
|
uses: docker/login-action@v1
|
|
with:
|
|
registry: ${{ secrets.REGISTRY_URL }}
|
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
-
|
|
name: Get short commit SHA
|
|
id: commit_sha
|
|
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
|
|
-
|
|
name: Build and push
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
platforms: linux/amd64,linux/arm64
|
|
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 }} |