]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Avoid Microsoft repo for ODBC. Step 2: prioritize ubuntu mirror 12574/head
authorAlexis Romero <alexis.romero@open-xchange.com>
Wed, 22 Feb 2023 13:42:09 +0000 (14:42 +0100)
committerAlexis Romero <alexis.romero@open-xchange.com>
Wed, 22 Feb 2023 13:42:09 +0000 (14:42 +0100)
set-ubuntu-mirror/action.yml

index d832513245f04d62d12b2b8e8f678bbf92d1d2af..b1a446167ac9ae4536e07ada292c0526ebe4334f 100644 (file)
@@ -1,8 +1,15 @@
 name: 'choose Ubuntu mirror for PowerDNS builds in Github Actions'
+inputs:
+  apt-repository:
+    description: 'Default Ubuntu APT repository mirror'
+    required: true
+    default: 'mirror.leaseweb.net'
 runs:
   using: "composite"
   steps:
     #- run: echo not changing mirror, using default Azure mirror
     #  shell: bash
-    - run: sudo sed -i 's/azure\.archive\.ubuntu\.com/mirror.leaseweb.net/' /etc/apt/sources.list
+    - run: sudo sed -i 's/azure\.archive\.ubuntu\.com/${{ inputs.apt-repository }}/' /etc/apt/sources.list
+      shell: bash
+    - run: "echo -e 'Package: *odbc*\nPin: origin \"${{ inputs.apt-repository }}\"\nPin-Priority: 1001' | sudo tee /etc/apt/preferences"
       shell: bash