Skip to content

Commit

Permalink
better way to import key and add repository
Browse files Browse the repository at this point in the history
  • Loading branch information
Taowyoo committed Dec 22, 2023
1 parent ddeb71a commit d4d2148
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,15 @@ jobs:

- name: Install additional dependencies
run: |
sudo apt-key adv --fetch-keys 'https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key'
sudo add-apt-repository 'deb https://download.01.org/intel-sgx/sgx_repo/ubuntu focal main'
sudo apt-key adv --fetch-keys 'https://apt.llvm.org/llvm-snapshot.gpg.key'
sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main'
add_repository_with_key() {
gpg_key="$1.gpg"
cat "$1" | gpg --dearmor > "$gpg_key"
sudo install -o root -g root -m 644 "$gpg_key" /usr/share/keyrings/
sudo echo "deb [arch=amd64 signed-by=/usr/share/keyrings/$gpg_key] $2" >> /etc/apt/sources.list.d/additional-dependencies-focal.list
sudo rm "$gpg_key"
}
add_repository_with_key intel-sgx-deb.key "https://download.01.org/intel-sgx/sgx_repo/ubuntu focal main"
add_repository_with_key llvm-snapshot.gpg.key "http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main"
sudo apt-get update -y
sudo apt-get install -y faketime protobuf-compiler libsgx-dcap-ql-dev clang-11 musl-tools
Expand Down

0 comments on commit d4d2148

Please sign in to comment.