cloud-build/.gitea/workflows/building.yaml

95 lines
3.5 KiB
YAML
Raw Normal View History

2024-08-27 18:23:50 +03:00
name: Building cloud-images
2024-04-26 18:25:50 +03:00
on:
push:
tags:
- 'build*'
2024-04-26 18:25:50 +03:00
jobs:
building-x86:
2024-04-26 18:25:50 +03:00
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
2024-04-26 18:25:50 +03:00
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: |
2024-09-16 12:42:47 +03:00
ssh builder 'cd cloud-build && git fetch origin && git pull -f origin configs --rebase'
2024-04-26 18:25:50 +03:00
- 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'
- name: Run script for container x86
run: |
ssh builder 'cd cloud-build && ./cloud-build.py -c ./configs/container-x86.yaml \
--stages build test sync --create-remote-dirs'
building-x86-vm:
runs-on: alt-sisyphus
steps:
- name: Configure ssh
2024-04-26 18:25:50 +03:00
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
2024-04-26 18:25:50 +03:00
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
2024-04-26 18:25:50 +03:00
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 }}
2024-09-16 12:42:47 +03:00
- name: Update building script from git
run: |
ssh -A abuilder "ssh builder 'cd cloud-build && git fetch origin && git pull -f origin configs --rebase'"
2024-04-26 18:25:50 +03:00
- 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'"
- name: Run script for container aarch
run: |
ssh -A abuilder "ssh builder 'cd cloud-build && ./cloud-build.py -c ./configs/container-aarch64.yaml --stages build test sync --create-remote-dirs'"