add build
This commit is contained in:
parent
3c838d2739
commit
d265763800
@ -1,7 +1,8 @@
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_run:
|
||||
workflows: ["stage"]
|
||||
types:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@ -35,26 +36,6 @@ jobs:
|
||||
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
|
||||
|
||||
- name: Restore filesystem cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
48
.gitea/workflows/stage.yaml
Normal file
48
.gitea/workflows/stage.yaml
Normal file
@ -0,0 +1,48 @@
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
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
|
Loading…
x
Reference in New Issue
Block a user