diff --git a/ci/deploy.sh b/ci/deploy.sh index 542407565..77b2ab449 100755 --- a/ci/deploy.sh +++ b/ci/deploy.sh @@ -5,15 +5,16 @@ set -x -eu -o pipefail # Exit with nonzero exit code if anything fails if [[ "$TRAVIS_EVENT_TYPE" == "cron" ]] || [[ "$TRAVIS_EVENT_TYPE" == "api" ]]; then keys_dir=$(mktemp -d) openssl aes-256-cbc \ - -K $encrypted_025d6e877aa4_key \ - -iv $encrypted_025d6e877aa4_iv \ - -in ci/keys.tar.enc -out ci/keys.tar -d - tar -C "$keys_dir" -xvf ci/keys.tar + -K $encrypted_080f214a372c_key \ + -iv $encrypted_080f214a372c_iv \ + -in ci/keys.tar.gz.enc -out ci/keys.gz.tar -d + tar -C "$keys_dir" -xzvf ci/keys.tar eval "$(ssh-agent -s)" - chmod 600 "$keys_dir/"* - ssh-add "$keys_dir/"* + chmod 600 "${keys_dir}/ssh-key" + ssh-add "${keys_dir}/ssh-key" + gpg --import "${keys_dir}/gpg-private-key" rm -rf "$keys_dir" fi @@ -36,14 +37,16 @@ if [[ "$TRAVIS_EVENT_TYPE" != "cron" ]] && [[ "$TRAVIS_EVENT_TYPE" != "api" ]]; exit 0 fi -git config --global user.name "Travis CI" -git config --global user.email "travis@travis.org" +git config --global user.name "Nur a bot" +git config --global user.email "joerg.nur-bot@thalheim.io" +git config --global user.signingkey "B4E40EEC9053254E" +git config --global commit.gpgsign true -#git clone git@github.com:nix-community/nur-channel +git clone git@github.com:nix-community/nur-channel -#old_channel_rev=$(git rev-parse HEAD) -#./bin/nur build-channel nur-channel -#new_channel_rev=$(git rev-parse HEAD) +old_channel_rev=$(git rev-parse HEAD) +./bin/nur build-channel nur-channel +new_channel_rev=$(git rev-parse HEAD) if [[ -z "$(git diff --exit-code)" ]]; then echo "No changes to the output on this push; exiting." @@ -54,6 +57,6 @@ else git push git@github.com:nix-community/NUR HEAD:master fi -#if [[ $old_channel_rev != $new_channel_rev ]]; then -# (cd nur-channel && git push origin master) -#fi +if [[ $old_channel_rev != $new_channel_rev ]]; then + (cd nur-channel && git push origin master) +fi diff --git a/ci/keys.tar.enc b/ci/keys.tar.enc deleted file mode 100644 index 88290df77..000000000 Binary files a/ci/keys.tar.enc and /dev/null differ diff --git a/ci/keys.tar.gz.enc b/ci/keys.tar.gz.enc new file mode 100644 index 000000000..43664bbd8 Binary files /dev/null and b/ci/keys.tar.gz.enc differ