mirror of
https://codeberg.org/demostf/frontend.git
synced 2026-06-03 18:24:12 +02:00
multi-arch docker
This commit is contained in:
parent
e02a9de1fa
commit
3dce5a8a07
3 changed files with 156 additions and 28 deletions
55
.github/workflows/ci.yaml
vendored
55
.github/workflows/ci.yaml
vendored
|
|
@ -6,30 +6,63 @@ on:
|
|||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
machine:
|
||||
- platform: x86_64-linux
|
||||
- platform: aarch64-linux
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: cachix/install-nix-action@v20
|
||||
- uses: actions/checkout@v4
|
||||
- if: matrix.machine.platform != 'x86_64-linux'
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- uses: cachix/install-nix-action@v26
|
||||
with:
|
||||
extra_nix_config: |
|
||||
extra-platforms = aarch64-linux
|
||||
- uses: icewind1991/attic-action@v1
|
||||
with:
|
||||
name: ci
|
||||
instance: https://cache.icewind.me
|
||||
authToken: '${{ secrets.ATTIC_TOKEN }}'
|
||||
- run: nix build .#frontend
|
||||
- run: nix build --option system ${{ matrix.machine.platform }} .#frontend
|
||||
|
||||
build-docker:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build]
|
||||
strategy:
|
||||
matrix:
|
||||
machine:
|
||||
- platform: x86_64-linux
|
||||
- platform: aarch64-linux
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- if: matrix.machine.platform != 'x86_64-linux'
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- uses: cachix/install-nix-action@v26
|
||||
with:
|
||||
extra_nix_config: |
|
||||
extra-platforms = aarch64-linux
|
||||
- uses: icewind1991/attic-action@v1
|
||||
with:
|
||||
name: ci
|
||||
instance: https://cache.icewind.me
|
||||
authToken: '${{ secrets.ATTIC_TOKEN }}'
|
||||
- run: nix build --option system ${{ matrix.machine.platform }} .#docker
|
||||
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
needs: [build-docker]
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
- uses: cachix/install-nix-action@v20
|
||||
uses: actions/checkout@v4
|
||||
- uses: cachix/install-nix-action@v26
|
||||
- uses: icewind1991/attic-action@v1
|
||||
with:
|
||||
name: ci
|
||||
instance: https://cache.icewind.me
|
||||
authToken: '${{ secrets.ATTIC_TOKEN }}'
|
||||
- run: nix build .#docker
|
||||
- name: Push image
|
||||
- run: nix run .#dockerManifest
|
||||
if: github.ref == 'refs/heads/main'
|
||||
run: |
|
||||
skopeo copy --dest-creds="${{ secrets.DOCKERHUB_USERNAME }}:${{ secrets.DOCKERHUB_TOKEN }}" "docker-archive:$(nix build .#docker --print-out-paths)" "docker://demostf/frontend"
|
||||
env:
|
||||
VERSION: "1.0.0"
|
||||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue