Add docs for deploying to the ROS bootstrap repo. #351
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Aptly Importer | |
on: | |
push: | |
branches: [master, refactor] | |
pull_request: | |
branches: ['*'] | |
jobs: | |
bionic-ci: | |
runs-on: ubuntu-18.04 | |
name: Bionic Aptly ${{ matrix.job_type }} - | |
debug ${{ matrix.show_debug_cmds }} | |
strategy: | |
matrix: | |
show_debug_cmds: | |
- true | |
- false | |
job_type: | |
- 'CI' | |
- 'CONFIG_TESTER' | |
exclude: | |
- job_type: 'CONFIG_TESTER' | |
show_debug_cmds: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install aptly repo | |
run: | | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ED75B5A4483DA07C | |
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 16E90B3FDF65EDE3AA7F323C04EE7237B7D453EC # Debian Stretch | |
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 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 CI tests | |
if: ${{ matrix.job_type == 'CI' }} | |
run: | | |
python3 scripts/aptly/aptly_importer_TEST.py | |
env: | |
_DEBUG_MSGS_REPREPRO_UPDATER_TEST_SUITE_: ${{ matrix.show_debug_cmds }} | |
_ALLOW_DESTRUCTIVE_TESTS_REPREPRO_UPDATER_TEST_SUITE_: true | |
# CONFIG FILE TESTER | |
- id: files | |
if: ${{ matrix.job_type == 'CONFIG_TESTER' }} | |
uses: jitterbit/get-changed-files@v1 | |
- name: Run testing on changed config files | |
if: ${{ matrix.job_type == 'CONFIG_TESTER' }} | |
run: | | |
for changed_file in ${{ steps.files.outputs.all }}; 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 |