Github Actions fix for PRs (#1687)

This commit is contained in:
Jack Ivanov 2020-01-16 13:06:11 +01:00 committed by GitHub
parent 24574a3205
commit 98f43c5cbd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -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

View file

@ -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 -