From f119b96cf34711aba4673b914aada4d559094643 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Molinero=20Fern=C3=A1ndez?= Date: Wed, 27 Apr 2022 19:25:43 +0200 Subject: [PATCH] Removed use of apt-key as it is deprecated --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a9db2d8..2d9f85a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,8 +23,8 @@ jobs: uses: 'actions/checkout@v3' - name: 'Install dependencies' run: | - curl -fsSL 'https://apt.releases.hashicorp.com/gpg' | sudo apt-key add - - sudo apt-add-repository "deb [arch=$(dpkg --print-architecture)] https://apt.releases.hashicorp.com $(lsb_release -cs) main" + curl --proto '=https' --tlsv1.2 -sSf 'https://apt.releases.hashicorp.com/gpg' | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/hashicorp.gpg + printf '%s\n' "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/trusted.gpg.d/hashicorp.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list >/dev/null sudo apt-get update && sudo apt-get install -y --no-install-recommends packer - name: 'Validate configuration' run: | @@ -44,8 +44,8 @@ jobs: uses: 'actions/checkout@v3' - name: 'Install dependencies' run: | - curl -fsSL 'https://apt.releases.hashicorp.com/gpg' | sudo apt-key add - - sudo apt-add-repository "deb [arch=$(dpkg --print-architecture)] https://apt.releases.hashicorp.com $(lsb_release -cs) main" + curl --proto '=https' --tlsv1.2 -sSf 'https://apt.releases.hashicorp.com/gpg' | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/hashicorp.gpg + printf '%s\n' "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/trusted.gpg.d/hashicorp.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list >/dev/null sudo apt-get update && sudo apt-get install -y --no-install-recommends terraform - name: 'Init Terraform' run: | @@ -69,8 +69,8 @@ jobs: uses: 'actions/checkout@v3' - name: 'Install dependencies' run: | - curl -fsSL 'https://apt.releases.hashicorp.com/gpg' | sudo apt-key add - - sudo apt-add-repository "deb [arch=$(dpkg --print-architecture)] https://apt.releases.hashicorp.com $(lsb_release -cs) main" + curl --proto '=https' --tlsv1.2 -sSf 'https://apt.releases.hashicorp.com/gpg' | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/hashicorp.gpg + printf '%s\n' "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/trusted.gpg.d/hashicorp.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list >/dev/null sudo apt-get update && sudo apt-get install -y --no-install-recommends packer qemu-utils qemu-system-x86 - name: 'Build image' run: |