88 lines
3.1 KiB
YAML
88 lines
3.1 KiB
YAML
name: Building cloud-images
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'build*'
|
|
|
|
jobs:
|
|
building-x86:
|
|
runs-on: alt-sisyphus
|
|
steps:
|
|
- name: Configure ssh
|
|
run: |
|
|
mkdir -p ~/.ssh/
|
|
echo "$SSH_KEY" > ~/.ssh/builder.key
|
|
chmod 600 ~/.ssh/builder.key
|
|
cat >>~/.ssh/config <<END
|
|
Host builder
|
|
HostName $SSH_HOST
|
|
User $SSH_USER
|
|
IdentityFile ~/.ssh/builder.key
|
|
StrictHostKeyChecking no
|
|
END
|
|
env:
|
|
SSH_USER: ${{ secrets.BUILDER_SSH_USER }}
|
|
SSH_KEY: ${{ secrets.BUILDER_SSH_KEY }}
|
|
SSH_HOST: ${{ secrets.BUILDER_SSH_HOST }}
|
|
- name: Update building script from git
|
|
run: |
|
|
ssh builder 'cd cloud-build && git fetch origin && git pull -f origin configs --rebase'
|
|
- name: Run script for x86
|
|
run: |
|
|
ssh builder 'cd cloud-build && ./cloud-build.py -c ./configs/cb-ve-x86.yaml \
|
|
--stages build test sync --create-remote-dirs'
|
|
|
|
building-x86-vm:
|
|
runs-on: alt-sisyphus
|
|
steps:
|
|
- name: Configure ssh
|
|
run: |
|
|
mkdir -p ~/.ssh/
|
|
echo "$SSH_KEY" > ~/.ssh/builder.key
|
|
chmod 600 ~/.ssh/builder.key
|
|
cat >>~/.ssh/config <<END
|
|
Host builder
|
|
HostName $SSH_HOST
|
|
User $SSH_USER
|
|
IdentityFile ~/.ssh/builder.key
|
|
StrictHostKeyChecking no
|
|
END
|
|
env:
|
|
SSH_USER: ${{ secrets.BUILDER_SSH_USER }}
|
|
SSH_KEY: ${{ secrets.BUILDER_SSH_KEY }}
|
|
SSH_HOST: ${{ secrets.BUILDER_SSH_HOST }}
|
|
- name: Update building script from git
|
|
run: |
|
|
ssh builder 'cd cloud-build && git fetch origin && git pull -f origin configs --rebase'
|
|
- name: Run script for vm
|
|
run: |
|
|
ssh builder 'cd cloud-build && ./cloud-build.py -c ./configs/cb-vm.yaml \
|
|
--stages build test sync --create-remote-dirs'
|
|
|
|
building-aarch:
|
|
runs-on: alt-sisyphus
|
|
steps:
|
|
- name: Configure ssh
|
|
run: |
|
|
mkdir -p ~/.ssh/
|
|
echo "$SSH_KEY" > ~/.ssh/builder.key
|
|
chmod 600 ~/.ssh/builder.key
|
|
cat >>~/.ssh/config <<END
|
|
Host abuilder
|
|
HostName $SSH_T_HOST
|
|
User $SSH_T_USER
|
|
IdentityFile ~/.ssh/builder.key
|
|
IdentitiesOnly yes
|
|
StrictHostKeyChecking no
|
|
END
|
|
env:
|
|
SSH_KEY: ${{ secrets.BUILDER_SSH_KEY }}
|
|
SSH_T_USER: ${{ secrets.TAISHAN_SSH_USER }}
|
|
SSH_T_HOST: ${{ secrets.TAISHAN_SSH_HOST }}
|
|
- name: Update building script from git
|
|
run: |
|
|
ssh -A abuilder "ssh builder 'cd cloud-build && git fetch origin && git pull -f origin configs --rebase'"
|
|
- name: Run script for aarch
|
|
run: |
|
|
ssh -A abuilder "ssh builder 'cd cloud-build && ./cloud-build.py -c ./configs/cb-aarch64.yaml --stages build test sync --create-remote-dirs'"
|