Skip to content

Commit

Permalink
cd: fix packaging for CentOS7
Browse files Browse the repository at this point in the history
Fix the problem with sudoers for CentOS7.

For more details see:
packpack/packpack#145
  • Loading branch information
0x501D committed Nov 15, 2022
1 parent da78c01 commit e99dfc0
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ on:

jobs:
package:
runs-on: ubuntu-latest
# We use a particular version of the distribution because we want to install
# a particular version of Docker.
runs-on: ubuntu-22.04

strategy:
fail-fast: false
Expand Down Expand Up @@ -64,6 +66,28 @@ jobs:
# that all tags will exist always.
run: git fetch --tags -f

# We use a specific version of Docker because otherwise we have a problem
# with sudoers on CentOS7.
# See more details: https://github.com/packpack/packpack/issues/145
- name: Reinstall Docker
if: |
matrix.platform.os == 'el' &&
matrix.platform.dist == '7'
run: |
sudo apt-get -y purge moby-containerd* moby-engine* moby-runc*
sudo mkdir -p /etc/apt/keyrings
curl -fsSL ${DOCKER_URL}/gpg | sudo gpg --dearmor -o ${GPG_KEY}
echo "deb [arch=$(dpkg --print-architecture) signed-by=${GPG_KEY}] \
${DOCKER_URL} $(lsb_release -cs) stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get -y install docker-ce=${DOCKER_VERSION} \
docker-ce-cli=${DOCKER_VERSION}
env:
DOCKER_URL: https://download.docker.com/linux/ubuntu
DOCKER_VERSION: 5:20.10.17~3-0~ubuntu-jammy
GPG_KEY: /etc/apt/keyrings/docker.gpg

- name: Create packages
run: ./packpack/packpack

Expand Down

0 comments on commit e99dfc0

Please sign in to comment.