mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
Bump to .NET 6. Add arm64 image build. Use short commit hash on image tag.
This commit is contained in:
@@ -2,13 +2,15 @@
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'dev'
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
name: Build Docker image
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
arch: ['amd64', 'arm64']
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
@@ -27,11 +29,17 @@ jobs:
|
||||
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:
|
||||
context: .
|
||||
file: docker/Dockerfile.amd64
|
||||
push: true
|
||||
tags: ${{ secrets.REGISTRY_URL }}/west/telegram-bot:latest,${{ secrets.REGISTRY_URL }}/west/telegram-bot:${{ github.sha }}
|
||||
file: docker/Dockerfile.${{ matrix.arch }}
|
||||
platforms: linux/${{ matrix.arch }}
|
||||
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 }}
|
||||
Reference in New Issue
Block a user