add build
Some checks failed
/ build (push) Has been cancelled

This commit is contained in:
Adrien Beaudouin 2025-06-07 19:39:33 +02:00
parent 902a34c92b
commit cdd808d068
2 changed files with 36 additions and 58 deletions

View File

@ -1,48 +0,0 @@
on:
push:
branches:
- main
jobs:
bootstrap:
runs-on: ubuntu-latest
steps:
- name: Checkout
run: |
git config --global advice.detachedHead false
git clone --branch 2025.05.2 --depth 1 https://codeberg.org/stagex/stagex.git $GITHUB_WORKSPACE
- name: Setup SSH for Buildx
uses: MrSquaare/ssh-setup-action@v3
with:
host: 10.0.0.101
private-key: ${{ secrets.RUNNER_SSH_PRIVATE_KEY }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
endpoint: ssh://root@10.0.0.101
- uses: docker/login-action@v3
with:
registry: ${{ vars.CONTAINER_REGISTRY }}
username: ${{ vars.CONTAINER_REGISTRY_USERNAME }}
password: ${{ secrets.CONTAINER_REGISTRY_PASSWORD }}
- name: Restore stage3 cache
uses: actions/cache/restore@v4
with:
path: fetch/bootstrap/stage3
key: stage3-${{ hashFiles('packages/bootstrap/stage3/package.toml') }}
- name: Fetch stage3
run: |
python3 ./src/fetch.py stage3
- name: Save stage3 cache
uses: actions/cache/save@v4
with:
path: fetch/bootstrap/stage3
key: stage3-${{ hashFiles('packages/bootstrap/stage3/package.toml') }}
# - name: Build stage3
# env:
# CONTAINER_REGISTRY: ${{ vars.CONTAINER_REGISTRY }}
# run: |
# sed -i 's|stagex/bootstrap-stage2|docker.io/stagex/bootstrap-stage2|' packages/bootstrap/stage3/Containerfile
# make registry-bootstrap-stage3 PROGRESS=plain BUILDER="docker buildx" PLATFORM=linux/amd64,linux/arm64 REGISTRY_USERNAME=$CONTAINER_REGISTRY/okami101/stagex

View File

@ -1,11 +1,10 @@
on:
workflow_run:
workflows: ["bootstrap"]
types:
- completed
push:
branches:
- main
jobs:
core:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
@ -13,6 +12,12 @@ jobs:
git config --global advice.detachedHead false
git clone --branch 2025.05.2 --depth 1 https://codeberg.org/stagex/stagex.git $GITHUB_WORKSPACE
- uses: docker/login-action@v3
with:
registry: ${{ vars.CONTAINER_REGISTRY }}
username: ${{ vars.CONTAINER_REGISTRY_USERNAME }}
password: ${{ secrets.CONTAINER_REGISTRY_PASSWORD }}
- name: Setup SSH for Buildx amd64
uses: MrSquaare/ssh-setup-action@v3
with:
@ -23,18 +28,39 @@ jobs:
with:
host: 10.0.0.102
private-key: ${{ secrets.RUNNER_SSH_PRIVATE_KEY }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
endpoint: ssh://root@10.0.0.101
- name: Restore stage3 cache
uses: actions/cache/restore@v4
with:
path: fetch/bootstrap/stage3
key: stage3-${{ hashFiles('packages/bootstrap/stage3/package.toml') }}
- name: Fetch stage3
run: |
python3 ./src/fetch.py stage3
- name: Save stage3 cache
uses: actions/cache/save@v4
with:
path: fetch/bootstrap/stage3
key: stage3-${{ hashFiles('packages/bootstrap/stage3/package.toml') }}
- name: Build stage3
env:
CONTAINER_REGISTRY: ${{ vars.CONTAINER_REGISTRY }}
run: |
sed -i 's|stagex/bootstrap-stage2|docker.io/stagex/bootstrap-stage2|' packages/bootstrap/stage3/Containerfile
make registry-bootstrap-stage3 PROGRESS=plain BUILDER="docker buildx" PLATFORM=linux/amd64,linux/arm64 REGISTRY_USERNAME=$CONTAINER_REGISTRY/okami101/stagex
- name: Set up Docker Buildx with arm64 endpoint
uses: docker/setup-buildx-action@v3
with:
append: |
- endpoint: ssh://root@10.0.0.102
platforms: linux/arm64
endpoint: ssh://root@10.0.0.101
- uses: docker/login-action@v3
with:
registry: ${{ vars.CONTAINER_REGISTRY }}
username: ${{ vars.CONTAINER_REGISTRY_USERNAME }}
password: ${{ secrets.CONTAINER_REGISTRY_PASSWORD }}
- name: Restore filesystem cache
uses: actions/cache@v4