From c197d37aaab70d49609f71b810a7207c7e6e0f39 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Wed, 22 Oct 2025 16:09:13 +1100 Subject: [PATCH] ci: install latest Azure CLI for APT sync (#10678) Whichever version of the CLI is installed on the GitHub runners doesn't appear to be able to run our script (which works just fine locally). --- .github/actions/setup-azure-cli/action.yml | 13 +++++++++++++ .github/workflows/_apt.yml | 3 +++ 2 files changed, 16 insertions(+) create mode 100644 .github/actions/setup-azure-cli/action.yml diff --git a/.github/actions/setup-azure-cli/action.yml b/.github/actions/setup-azure-cli/action.yml new file mode 100644 index 000000000..eef214aa2 --- /dev/null +++ b/.github/actions/setup-azure-cli/action.yml @@ -0,0 +1,13 @@ +name: "Setup Azure CLI" +description: "Installs the latest Azure CLI version" +runs: + using: "composite" + steps: + - run: | + sudo apt-get install -y ca-certificates curl apt-transport-https lsb-release gnupg + curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/microsoft.gpg > /dev/null + AZ_REPO=$(lsb_release -cs) + echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | sudo tee /etc/apt/sources.list.d/azure-cli.list + sudo apt-get update + sudo apt-get install -y azure-cli + shell: bash diff --git a/.github/workflows/_apt.yml b/.github/workflows/_apt.yml index bd26081fd..cea97cb8a 100644 --- a/.github/workflows/_apt.yml +++ b/.github/workflows/_apt.yml @@ -15,6 +15,9 @@ jobs: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: fetch-depth: 0 + + - uses: ./.github/actions/setup-azure-cli + - run: scripts/sync-apt.sh env: AZURERM_ARTIFACTS_CONNECTION_STRING: ${{ secrets.AZURERM_ARTIFACTS_CONNECTION_STRING }}