Skip to content

Add support for "routing table" #589

Add support for "routing table"

Add support for "routing table" #589

Workflow file for this run

---
# Copyright (c) Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
name: import-galaxy
on:
# Run CI against all pushes (direct commits, also merged PRs) to main, and all Pull Requests
push:
branches:
- main
- stable-*
pull_request:
env:
# Adjust this to your collection
NAMESPACE: community
COLLECTION_NAME: routeros
jobs:
build-collection:
name: Build collection artifact
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
path: ./checkout
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install ansible-core
run: pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check
- name: Make sure galaxy.yml has version entry
run: >-
python -c
'import yaml ;
f = open("galaxy.yml", "rb") ;
data = yaml.safe_load(f) ;
f.close() ;
data["version"] = data.get("version") or "0.0.1" ;
f = open("galaxy.yml", "wb") ;
f.write(yaml.dump(data).encode("utf-8")) ;
f.close() ;
'
working-directory: ./checkout
- name: Build collection
run: ansible-galaxy collection build
working-directory: ./checkout
- name: Copy artifact into subdirectory
run: mkdir ./artifact && mv ./checkout/${{ env.NAMESPACE }}-${{ env.COLLECTION_NAME }}-*.tar.gz ./artifact
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.NAMESPACE }}-${{ env.COLLECTION_NAME }}-${{ github.sha }}
path: ./artifact/
import-galaxy:
name: Import artifact with Galaxy importer
runs-on: ubuntu-latest
needs:
- build-collection
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install ansible-core
run: pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check
- name: Install galaxy-importer
run: pip install galaxy-importer --disable-pip-version-check
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: ${{ env.NAMESPACE }}-${{ env.COLLECTION_NAME }}-${{ github.sha }}
- name: Run Galaxy importer
run: python -m galaxy_importer.main ${{ env.NAMESPACE }}-${{ env.COLLECTION_NAME }}-*.tar.gz