Reviewed-on: #16
This commit is contained in:
@@ -7,30 +7,32 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
build-and-push:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Enable QEMU for multi-arch builds
|
||||||
uses: actions/setup-qemu-action@v3
|
run: |
|
||||||
|
docker run --privileged --rm tonistiigi/binfmt --install all
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Create and use Docker Buildx builder
|
||||||
uses: actions/setup-buildx-action@v3
|
run: |
|
||||||
|
docker buildx create --name miauinv-builder --use || docker buildx use miauinv-builder
|
||||||
|
docker buildx inspect --bootstrap
|
||||||
|
|
||||||
- name: Log in to Gitea Container Registry
|
- name: Log in to Gitea Container Registry
|
||||||
uses: docker/login-action@v3
|
run: |
|
||||||
with:
|
echo "${{ secrets.GITHUB_TOKEN }}" | docker login git.miaurizius.de \
|
||||||
registry: git.miaurizius.de
|
--username "${{ gitea.actor }}" \
|
||||||
username: ${{ gitea.actor }}
|
--password-stdin
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push multi-arch Docker image
|
||||||
uses: docker/build-push-action@v6
|
run: |
|
||||||
with:
|
docker buildx build \
|
||||||
context: .
|
--platform linux/amd64,linux/arm64 \
|
||||||
file: ./Dockerfile
|
--file ./Dockerfile \
|
||||||
push: true
|
--tag git.miaurizius.de/${{ gitea.repository }}:latest \
|
||||||
platforms: linux/amd64,linux/arm64
|
--tag git.miaurizius.de/${{ gitea.repository }}:${{ gitea.event.release.tag_name }} \
|
||||||
tags: |
|
--push \
|
||||||
git.miaurizius.de/${{ gitea.repository }}:latest
|
.
|
||||||
git.miaurizius.de/${{ gitea.repository }}:${{ gitea.event.release.tag_name }}
|
|
||||||
Reference in New Issue
Block a user