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
LeonidVas committed Nov 3, 2022
1 parent df94d6d commit e7796bf
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ jobs:
if: |
github.event_name == 'push' ||
github.event.pull_request.head.repo.full_name != github.repository
# Packaging for CentOS 7 does not work with other versions, see:
# https://github.com/packpack/packpack/issues/145
runs-on: ubuntu-18.04
# 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 @@ -61,6 +61,28 @@ jobs:
# that all tags will exists 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 e7796bf

Please sign in to comment.