Skip to content

Update to the latest colcon releases #342

Update to the latest colcon releases

Update to the latest colcon releases #342

Workflow file for this run

---
name: Aptly Importer
on:
push:
branches: [master, refactor]
pull_request:
branches: ['*']
jobs:
ci:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install aptly repo
run: |
wget -qO - https://www.aptly.info/pubkey.txt | sudo apt-key add -
sudo bash -c "echo 'deb http://repo.aptly.info/ squeeze main' > /etc/apt/sources.list.d/aptly.list"
- name: Install software
run: |
sudo apt-get update
sudo apt-get install -y gpg python3 aptly ubuntu-keyring
- name: Fix weird problem with trust keys
run: |
gpg --check-trustdb 2>&1| grep 'not found' | awk '{print $8}' >bad-keys.txt
gpg --export-ownertrust > ownertrust-gpg.txt
mv ~/.gnupg/trustdb.gpg ~/.gnupg/trustdb.gpg-broken
for KEY in `cat bad-keys.txt` ; do sed -i "/$KEY/d" ownertrust-gpg.txt ; done
gpg --import-ownertrust ownertrust-gpg.txt
rm bad-keys.txt ownertrust-gpg.txt
- name: Setup enviroment
run: |
gpg --no-default-keyring --keyring /usr/share/keyrings/ubuntu-archive-keyring.gpg --export | gpg --no-default-keyring --keyring trustedkeys.gpg --import
gpg --no-default-keyring --keyring trustedkeys.gpg --keyserver keyserver.ubuntu.com --recv-keys 0146DC6D4A0B2914BDED34DB648ACFD622F3D138 # Debian Buster
gpg --no-default-keyring --keyring trustedkeys.gpg --keyserver keyserver.ubuntu.com --recv-keys 0E98404D386FA1D9 # Debian Bullseye
gpg --no-default-keyring --keyring trustedkeys.gpg --keyserver keyserver.ubuntu.com --recv-keys 4CB50190207B4758A3F73A796ED0E7B82643E131 # Debian bookworm
gpg --no-default-keyring --keyring trustedkeys.gpg --keyserver keyserver.ubuntu.com --recv-keys 67170598AF249743 # OSRF Repository
- name: Generate key
run: |
cat <<-EOF > genkey
Key-Type: 1
Key-Length: 4096
Subkey-Type: 1
Subkey-Length: 4096
Name-Real: Testing name
Name-Email: [email protected]
Expire-Date: 0
%no-protection
EOF
gpg --gen-key --batch genkey
# CI TESTING
- name: Run software testsuite
if: ${{ github.event_name != 'pull_request' }}
run: |
python3 scripts/aptly/aptly_importer_TEST.py
env:
_DEBUG_MSGS_REPREPRO_UPDATER_TEST_SUITE_: false
_ALLOW_DESTRUCTIVE_TESTS_REPREPRO_UPDATER_TEST_SUITE_: true
# CI TESTING (debug)
- name: Run CI tests (debug)
if: ${{ github.event_name != 'pull_request' }}
run: |
python3 scripts/aptly/aptly_importer_TEST.py
env:
_DEBUG_MSGS_REPREPRO_UPDATER_TEST_SUITE_: true
_ALLOW_DESTRUCTIVE_TESTS_REPREPRO_UPDATER_TEST_SUITE_: true
# CONFIG FILE TESTER
- name: Idenfify files changed in this PR.
id: files
if: ${{ github.event_name == 'pull_request' }}
run: |
CHANGED_FILES=$(git diff --name-only ${{ github.event.pull_request.base.sha }}... | tr '\n' ' ')
echo "changed-files=$CHANGED_FILES" | tee $GITHUB_OUTPUT
- name: Run testing on changed config files
if: ${{ github.event_name == 'pull_request' }}
run: |
for changed_file in ${{ steps.files.outputs.changed-files }}; do
if [[ ${changed_file} != ${changed_file/config\/*.yaml} ]]; then
echo "+ Detected config file: ${changed_file}."
python3 scripts/aptly/aptly_importer.py --ignore-signatures --only-mirror-creation ${changed_file}
else
echo "- Ignoring non config file ${changed_file}."
fi
done