build multiarch
This commit is contained in:
parent
0436ebed49
commit
230988d2dd
1 changed files with 4 additions and 1 deletions
|
|
@ -13,6 +13,8 @@ env:
|
||||||
BUILDKITD_FLAGS: --oci-worker-no-process-sandbox
|
BUILDKITD_FLAGS: --oci-worker-no-process-sandbox
|
||||||
REGISTRY_URL: git.sb20.xengi.de
|
REGISTRY_URL: git.sb20.xengi.de
|
||||||
REGISTRY_TAG: latest
|
REGISTRY_TAG: latest
|
||||||
|
# Platforms to build for: amd64 (NAS/test) + arm64 (RB5009)
|
||||||
|
PLATFORMS: linux/amd64,linux/arm64
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
@ -25,7 +27,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.docker
|
mkdir -p ~/.docker
|
||||||
echo "{\"auths\":{\"${{ env.REGISTRY_URL }}\":{\"username\":\"${{ env.FORGEJO_REPOSITORY_OWNER }}\",\"password\":\"${{ secrets.REGISTRY_TOKEN }}\"}}}" > ~/.docker/config.json
|
echo "{\"auths\":{\"${{ env.REGISTRY_URL }}\":{\"username\":\"${{ env.FORGEJO_REPOSITORY_OWNER }}\",\"password\":\"${{ secrets.REGISTRY_TOKEN }}\"}}}" > ~/.docker/config.json
|
||||||
- name: Build container
|
- name: Build and push multi-arch container
|
||||||
run: |
|
run: |
|
||||||
export CREATED=$(date -Iseconds)
|
export CREATED=$(date -Iseconds)
|
||||||
sed -i "s/%%CREATED%%/$CREATED/" Dockerfile
|
sed -i "s/%%CREATED%%/$CREATED/" Dockerfile
|
||||||
|
|
@ -34,6 +36,7 @@ jobs:
|
||||||
--frontend dockerfile.v0 \
|
--frontend dockerfile.v0 \
|
||||||
--local context=./ \
|
--local context=./ \
|
||||||
--local dockerfile=./ \
|
--local dockerfile=./ \
|
||||||
|
--opt platform=${{ env.PLATFORMS }} \
|
||||||
--output type=image,name=${{ env.REGISTRY_URL }}/${{ env.FORGEJO_REPOSITORY }}:${{ env.REGISTRY_TAG }},push=true
|
--output type=image,name=${{ env.REGISTRY_URL }}/${{ env.FORGEJO_REPOSITORY }}:${{ env.REGISTRY_TAG }},push=true
|
||||||
- name: Send notification
|
- name: Send notification
|
||||||
if: ${{ failure() }}
|
if: ${{ failure() }}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue