diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index 517d0c55b..57b5c9f87 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -21,6 +21,7 @@ jobs: SSH_AUTH_SOCK: /tmp/ssh_agent.sock LAUNCHPAD_LXD_BOT_KEY: ${{ secrets.LAUNCHPAD_LXD_BOT_KEY }} run: | + set -eux mkdir -m 0700 -p ~/.ssh/ ssh-agent -a "${SSH_AUTH_SOCK}" > /dev/null ssh-add - <<< "${{ secrets.LAUNCHPAD_LXD_BOT_KEY }}" @@ -40,7 +41,7 @@ jobs: SSH_AUTH_SOCK: /tmp/ssh_agent.sock TARGET: ${{ github.ref_name }} run: | - set -x + set -eux git config --global transfer.fsckobjects true git config --global user.name "Canonical LXD Bot" git config --global user.email "lxd@lists.canonical.com" @@ -50,7 +51,8 @@ jobs: localRev="$(git rev-parse HEAD)" go install github.com/canonical/lxd-ci/lxd-snapcraft@latest git clone -b "${TARGET}" git+ssh://lxdbot@git.launchpad.net/~canonical-lxd/lxd ~/lxd-pkg-snap-lp - ver="$(lxd-snapcraft -get-version -file ~/lxd-pkg-snap-lp/snapcraft.yaml)" + # XXX: `ver` contains an array with the 2 versions + ver=($(lxd-snapcraft -get-version -file ~/lxd-pkg-snap-lp/snapcraft.yaml)) rsync -a --exclude .git --delete . ~/lxd-pkg-snap-lp/ cd ~/lxd-pkg-snap-lp lxd-snapcraft -set-version "${ver[0]}" -set-source-commit "${ver[1]}" diff --git a/.github/workflows/commits.yml b/.github/workflows/commits.yml index 2c6f78e7b..2f3948a53 100644 --- a/.github/workflows/commits.yml +++ b/.github/workflows/commits.yml @@ -33,7 +33,7 @@ jobs: env: TARGET: ${{ github.event.pull_request.base.ref }} run: | - set -x + set -eux [ "${TARGET}" = "latest-edge" ] && exit 0 echo "Invalid branch target: ${TARGET}"