From 00a4cd99160176f87542704bc0a8c7e6d93e1c38 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Sat, 2 Dec 2023 23:14:08 +0100 Subject: [PATCH 1/3] upgrade lxc-helpers --- lxc-helpers-lib.sh | 22 +++++++++++++- lxc-helpers.sh | 76 ++++++++++++++++++++++++++++++++++------------ 2 files changed, 77 insertions(+), 21 deletions(-) diff --git a/lxc-helpers-lib.sh b/lxc-helpers-lib.sh index da71f88..81b368b 100755 --- a/lxc-helpers-lib.sh +++ b/lxc-helpers-lib.sh @@ -7,6 +7,9 @@ LXC_SELF_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" LXC_BIN=/usr/local/bin LXC_CONTAINER_CONFIG_ALL="unprivileged lxc libvirt docker k8s" LXC_CONTAINER_CONFIG_DEFAULT="lxc libvirt docker" +LXC_IPV6_PREFIX_DEFAULT="fc15" +LXC_DOCKER_PREFIX_DEFAULT="172.17" +LXC_IPV6_DOCKER_PREFIX_DEFAULT="fd00:d0ca" : ${LXC_SUDO:=} : ${LXC_CONTAINER_RELEASE:=bookworm} @@ -372,12 +375,14 @@ function lxc_apt_install_inside() { function lxc_install_lxc() { local name="$1" local prefix="$2" + local prefixv6="$3" - lxc_container_inside $name lxc_install_lxc_inside $prefix + lxc_container_inside $name lxc_install_lxc_inside $prefix $prefixv6 } function lxc_install_lxc_inside() { local prefix="$1" + local prefixv6="${2:-$LXC_IPV6_PREFIX_DEFAULT}" local packages="make git libvirt0 libpam-cgfs bridge-utils uidmap dnsmasq-base dnsmasq dnsmasq-utils qemu-user-static lxc-templates debootstrap" if test "$(lxc_release)" = bookworm ; then @@ -398,6 +403,10 @@ LXC_NETMASK="255.255.255.0" LXC_NETWORK="$prefix.0/24" LXC_DHCP_RANGE="$prefix.2,$prefix.254" LXC_DHCP_MAX="253" +LXC_IPV6_ADDR="$prefixv6::216:3eff:fe00:1" +LXC_IPV6_MASK="64" +LXC_IPV6_NETWORK="$prefixv6::/64" +LXC_IPV6_NAT="true" EOF systemctl start lxc-net fi @@ -410,5 +419,16 @@ function lxc_install_docker() { } function lxc_install_docker_inside() { + mkdir /etc/docker + cat > /etc/docker/daemon.json < Date: Sat, 2 Dec 2023 21:37:56 +0100 Subject: [PATCH 2/3] IPv6 tests --- .forgejo/workflows/integration.yml | 6 ++++-- runner-config.yaml | 1 + testdata/ipv6/.forgejo/workflows/test.yml | 11 +++++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 testdata/ipv6/.forgejo/workflows/test.yml diff --git a/.forgejo/workflows/integration.yml b/.forgejo/workflows/integration.yml index 05fc2dc..1558dc2 100644 --- a/.forgejo/workflows/integration.yml +++ b/.forgejo/workflows/integration.yml @@ -11,8 +11,8 @@ jobs: strategy: matrix: info: - - version: "1.21.0-7-rc2" - image: codeberg.org/forgejo-experimental/forgejo + - version: "1.21" + image: codeberg.org/forgejo/forgejo - version: "1.20" image: codeberg.org/forgejo/forgejo steps: @@ -29,3 +29,5 @@ jobs: echo "============================ demo ===================" forgejo-test-helper.sh run_workflow testdata/demo $url root demo setup-forgejo $token + echo "============================ IPv6 ===================" + forgejo-test-helper.sh run_workflow testdata/ipv6 $url root ipv6 setup-forgejo $token diff --git a/runner-config.yaml b/runner-config.yaml index 8f5f076..4f14a27 100644 --- a/runner-config.yaml +++ b/runner-config.yaml @@ -19,6 +19,7 @@ cache: container: network: "bridge" + enable_ipv6: true privileged: false options: workdir_parent: diff --git a/testdata/ipv6/.forgejo/workflows/test.yml b/testdata/ipv6/.forgejo/workflows/test.yml new file mode 100644 index 0000000..0eed094 --- /dev/null +++ b/testdata/ipv6/.forgejo/workflows/test.yml @@ -0,0 +1,11 @@ +on: [push] +jobs: + ipv6: + runs-on: docker + container: + image: debian:bookworm + steps: + - run: | + set -x + apt update -qq ; apt --quiet install -qq --yes iputils-ping + ping -c 1 -6 ::1 From 5907644119b7e8ba515ebb240f1ab38baaeef03c Mon Sep 17 00:00:00 2001 From: cascading-pr Date: Sat, 2 Dec 2023 20:33:38 +0000 Subject: [PATCH 3/3] upgrade to runner v3.3.0 --- RUNNER_VERSION | 2 +- action.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/RUNNER_VERSION b/RUNNER_VERSION index 6d260c3..b299be9 100644 --- a/RUNNER_VERSION +++ b/RUNNER_VERSION @@ -1 +1 @@ -v3.2.0 +v3.3.0 diff --git a/action.yml b/action.yml index 99782a5..2b7df44 100644 --- a/action.yml +++ b/action.yml @@ -46,7 +46,7 @@ inputs: default: 'https://code.forgejo.org/forgejo/runner' runner-version: description: 'Runner version. If it starts with @ (for instance @featurebranch), the runner will be built from source using the specified branch.' - default: 'v3.2.0' + default: 'v3.3.0' container: description: 'Name of the container running the Forgejo instance' default: 'forgejo'