tried to fix #15
All checks were successful
test-and-lint / test-and-lint (pull_request) Successful in 4m12s
All checks were successful
test-and-lint / test-and-lint (pull_request) Successful in 4m12s
This commit is contained in:
@@ -7,30 +7,32 @@ on:
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
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
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.miaurizius.de
|
||||
username: ${{ gitea.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
echo "${{ secrets.GITHUB_TOKEN }}" | docker login git.miaurizius.de \
|
||||
--username "${{ gitea.actor }}" \
|
||||
--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