Bump to .NET 6. Add arm64 image build. Use short commit hash on image tag.

This commit is contained in:
West14
2022-01-10 00:50:05 +02:00
parent 60f6a639b6
commit 9c291892cd
12 changed files with 38 additions and 30 deletions
+13 -5
View File
@@ -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 }}