Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
96f1a40266
|
|||
|
959ba7d2d1
|
|||
|
c579fc95be
|
|||
|
d70aa85f99
|
|||
|
e5276053f2
|
|||
|
9f9386eba8
|
|||
|
1ff7d6b776
|
|||
|
9fd789bb6a
|
|||
|
043d4c0d5e
|
|||
|
59ba5a00e1
|
|||
|
50da145feb
|
|||
|
0b5943f792
|
|||
|
ba31c4f582
|
|||
|
370b875df1
|
|||
|
9393004434
|
|||
|
aec68c3ea5
|
|||
|
baad115f01
|
|||
|
09e1b2bcdc
|
|||
|
2ffe17ca60
|
|||
|
3596998f28
|
|||
|
2dc854c65a
|
@@ -6,31 +6,38 @@ on:
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
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
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.miaurizius.de
|
||||
username: ${{ gitea.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login git.miaurizius.de \
|
||||
--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: Prepare Docker image tags
|
||||
run: |
|
||||
IMAGE_REPO="$(echo "git.miaurizius.de/${{ gitea.repository }}" | tr '[:upper:]' '[:lower:]')"
|
||||
echo "IMAGE_REPO=$IMAGE_REPO" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Build and push multi-arch Docker image
|
||||
run: |
|
||||
docker buildx build \
|
||||
--platform linux/amd64,linux/arm64 \
|
||||
--file ./Dockerfile \
|
||||
--tag "$IMAGE_REPO:latest" \
|
||||
--tag "$IMAGE_REPO:${{ gitea.event.release.tag_name }}" \
|
||||
--push \
|
||||
.
|
||||
Reference in New Issue
Block a user