Skip to content

Commit 508ae94

Browse files
committed
CI: Use snapshot.debian.org for python:2.7
1 parent dd625fe commit 508ae94

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

.github/workflows/test.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,22 @@ jobs:
1919
container:
2020
image: python:${{ matrix.python-version }}
2121
steps:
22+
- name: Update APT repositories
23+
run: |
24+
if [ $PYTHON_VERSION = 2.7 ]; then
25+
# Disable 'deb.debian.org' and 'security.debian.org' sources
26+
# Enable 'snapshot.debian.org' sources
27+
sed 's@^\(deb https\?://\(deb\.debian\.org\|security\.debian\.org\)/\)@# \1@; s@^# \(deb http://snapshot\.debian\.org\/\)@\1@' < /etc/apt/sources.list > /etc/apt/sources.list.new
28+
mv /etc/apt/sources.list.new /etc/apt/sources.list
29+
apt-get update -o Acquire::Check-Valid-Until=false
30+
else
31+
apt-get update
32+
fi
33+
env:
34+
PYTHON_VERSION: ${{ matrix.python-version }}
2235
- uses: actions/checkout@v3
2336
- name: Install SSH
2437
run: |
25-
apt-get update -qq
2638
apt-get install -qq openssh-client openssh-server
2739
- run: pip install setuptools
2840
- run: pip install contextlib2

0 commit comments

Comments
 (0)