docker
This commit is contained in:
parent
0007eefa54
commit
13d49adfdd
2 changed files with 25 additions and 3 deletions
|
@ -1,14 +1,34 @@
|
||||||
|
matrix:
|
||||||
|
platform:
|
||||||
|
- linux/amd64
|
||||||
|
- linux/arm64
|
||||||
|
|
||||||
|
labels:
|
||||||
|
platform: ${platform}
|
||||||
|
|
||||||
when:
|
when:
|
||||||
- event: push
|
- event: push
|
||||||
branch: main
|
branch: main
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: pacstrap
|
- name: pacstrap_x86_64
|
||||||
image: git.hydrar.de/navos/navos:latest
|
image: git.hydrar.de/navos/navos:latest
|
||||||
privileged: true
|
privileged: true
|
||||||
commands:
|
commands:
|
||||||
- pacman -Syu --noconfirm && pacman -S --noconfirm navinstall && yes | pacman -Scc
|
- pacman -Syu --noconfirm && pacman -S --noconfirm navinstall && yes | pacman -Scc
|
||||||
- mkdir os && navinstall create-tar os
|
- mkdir os-x86_64 && navinstall create-tar os-x86_64
|
||||||
|
when:
|
||||||
|
platform: linux/amd64
|
||||||
|
|
||||||
|
- name: pacstrap_aarch64
|
||||||
|
image: git.hydrar.de/navos/navos:latest
|
||||||
|
privileged: true
|
||||||
|
commands:
|
||||||
|
- pacman -Syu --noconfirm && pacman -S --noconfirm navinstall && yes | pacman -Scc
|
||||||
|
- mkdir os-aarch64 && navinstall create-tar os-aarch64
|
||||||
|
when:
|
||||||
|
platform: linux/arm64
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
image: woodpeckerci/plugin-docker-buildx
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
settings:
|
settings:
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
FROM scratch
|
FROM scratch
|
||||||
COPY --from=builder ./os/ /
|
ARG TARGETARCH
|
||||||
|
ARG ARCH=$(if [ "$TARGETARCH" -eq "linux/arm64" ]; then echo "aarch64"; else echo "x86_64"; fi)
|
||||||
|
COPY ./os-${ARCH}/ /
|
||||||
CMD ["/bin/sh"]
|
CMD ["/bin/sh"]
|
Loading…
Add table
Reference in a new issue