This action helps you to use the Axway APIM CLI in a GitHub Actions workflow. You can import APIs, Applications, Organizations, and Users into an API-Manager in Batch-Mode based on a specified directory structure.
Additionally, you can call the APIM CLI directly with a given command according to your needs.
Required The hostname of the API-Manager to use.
Required The username to use for the API-Manager.
Required The password to use for the API-Manager.
The API-Manager port.
Required Some extra parameters which should be used by the APIM-CLI. For instance '-port 443', '-force' or '-returnCodeMapping 10:0'
The directory containing your APIs. Each API in a separate directory.
The directory containing your organizations. Each organization in a separate directory.
The directory containing your applications. Each application in a separate directory.
The directory containing your users. Each user in a separate directory.
Run an APIM-CLI command. For example: 'apim api check-certs'. You may combine this with apimExtraArgs depending on you the command you use.
- name: Import APIs and Applications
uses: Axway-API-Management-Plus/apim-cli-github-action@v1.5.1
with:
apimHostname: 'manager.customer.com'
apimUsername: 'apiadmin'
apimPassword: '1234567890'
apimExtraArgs: '-port 443 -force -returnCodeMapping 10:0'
apiDirectory: 'axway/api-management/APIs'
appDirectory: 'axway/api-management/Apps'
env:
BACKEND_HOST: 'http://mocked-apis:8280'
- name: Validate certificates
uses: Axway-API-Management-Plus/apim-cli-github-action@v1.5.1
with:
apimHostname: '${{ github.event.inputs.apimHost }}'
apimPort: "443"
apimUsername: ${{ github.event.inputs.apimUsername }}
apimPassword: ${{ github.event.inputs.apimPassword }}
apimCLICommand: 'api check-certs'
apimExtraArgs: '-days 60'