Skip to content

pull request for testing the rockcraft pack in GitHub runners only, do not merge #25

pull request for testing the rockcraft pack in GitHub runners only, do not merge

pull request for testing the rockcraft pack in GitHub runners only, do not merge #25

#
# On pull request workflow for ROCKs on self-hosted Github runners
# - Build ROCK
# - Scan using Trivy scanner
# - Upload scan report
#
name: On pull request self-hosted
on:
pull_request:
jobs:
build-scan-rocks:
name: Build and scan ROCKs self-hosted
runs-on: [self-hosted, linux, X64, jammy, xlarge]
# long timeout ensures heavy ROCKs have enoguh time to finish build/pack
timeout-minutes: 2400
strategy:
matrix:
rock:
- mlserver-huggingface
steps:
- name: Checkout branch
uses: actions/checkout@v3
with:
repository: canonical/seldonio-rocks
- name: Install tools
run: |
sudo apt-get update -yqq
sudo apt install software-properties-common -yqq
sudo apt-get install -yqq python3-pip
sudo --preserve-env=http_proxy,https_proxy,no_proxy pip3 install tox pip-tools
sudo snap install jq
sudo snap install yq
- name: Install ROCK dev tools
run: |
sudo snap install rockcraft --classic --edge
sudo snap install skopeo --edge --devmode
- name: Setup LXD
run: |
sudo lxd waitready || true
sudo lxd init --minimal
sudo chmod a+wr /var/snap/lxd/common/lxd/unix.socket
lxc network set lxdbr0 ipv6.address none
bash -c 'sudo usermod -a -G lxd $USER'
bash -c 'sudo su $USER'
sudo iptables -I DOCKER-USER -j ACCEPT
- name: launch lxc container
run: lxc launch ubuntu:22.04
- name: launch lxc container (root)
if: always()
run: sudo lxc launch ubuntu:22.04