diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3b9d885..457f6dd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -68,6 +68,8 @@ jobs: env: DEPLOY: cloud-init UBUNTU_VERSION: ${{ matrix.UBUNTU_VERSION }} + REPOSITORY: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name || github.repository }} + BRANCH: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.ref }} run: | ssh-keygen -f ~/.ssh/id_rsa -t rsa -N '' # sed -i "s/^reduce_mtu:\s0$/reduce_mtu: 80/" config.cfg diff --git a/tests/pre-deploy.sh b/tests/pre-deploy.sh index dc51008..e6cee52 100755 --- a/tests/pre-deploy.sh +++ b/tests/pre-deploy.sh @@ -8,8 +8,8 @@ tar xf $HOME/lxc/cache.tar -C / || echo "Didn't extract cache." cp -f tests/lxd-bridge /etc/default/lxd-bridge cp -f tests/algo.conf /etc/default/algo.conf -export REPOSITORY=${GITHUB_REPOSITORY} -export BRANCH=${GITHUB_REF#refs/heads/} +export REPOSITORY=${REPOSITORY:-${GITHUB_REPOSITORY}} +export BRANCH=${BRANCH:-${GITHUB_REF#refs/heads/}} if [[ "$DEPLOY" == "cloud-init" ]]; then bash tests/cloud-init.sh | lxc profile set default user.user-data -