Merge pull request 'bugfix/15-docker-deployment' (#20) from bugfix/15-docker-deployment into main
Reviewed-on: #20
This commit is contained in:
@@ -7,15 +7,19 @@ on:
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: docker-builder
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: actions/setup-qemu-action@v3
|
||||
- name: Enable QEMU for multi-arch builds
|
||||
run: |
|
||||
docker run --privileged --rm tonistiigi/binfmt --install all
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: actions/setup-buildx-action@v3
|
||||
- name: Create and use Docker Buildx builder
|
||||
run: |
|
||||
docker buildx create --name miauinv-builder --use || docker buildx use miauinv-builder
|
||||
docker buildx inspect --bootstrap
|
||||
|
||||
- name: Log in to Gitea Container Registry
|
||||
run: |
|
||||
@@ -23,13 +27,12 @@ jobs:
|
||||
--username "${{ secrets.REGISTRY_USER }}" \
|
||||
--password-stdin
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: |
|
||||
git.miaurizius.de/${{ gitea.repository }}:latest
|
||||
git.miaurizius.de/${{ gitea.repository }}:${{ gitea.event.release.tag_name }}
|
||||
- name: Build and push multi-arch Docker image
|
||||
run: |
|
||||
docker buildx build \
|
||||
--platform linux/amd64,linux/arm64 \
|
||||
--file ./Dockerfile \
|
||||
--tag git.miaurizius.de/${{ gitea.repository }}:latest \
|
||||
--tag git.miaurizius.de/${{ gitea.repository }}:${{ gitea.event.release.tag_name }} \
|
||||
--push \
|
||||
.
|
||||
Reference in New Issue
Block a user