Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
c272936860 | |||
154a551f3d |
10
README.md
10
README.md
@ -7,9 +7,11 @@ This action imports the repository as an ansible-galaxy role
|
|||||||
|
|
||||||
The following parameters can be used as `step.with` keys:
|
The following parameters can be used as `step.with` keys:
|
||||||
|
|
||||||
| Name | Type | Default | Required |Description |
|
| Name | Type | Default | Required |Description |
|
||||||
| ---------------- | ------ | ------- |--------- |---------------------- |
|
| ------------------ | ------ | ------- |--------- |------------------------ |
|
||||||
| `galaxy-api-key` | String | | yes |Ansible Galaxy API-key |
|
| `galaxy-api-key` | String | | yes | Ansible Galaxy API-key |
|
||||||
|
| `repository-owner` | String | | yes | GitHub Repository Owner |
|
||||||
|
| `repository-name` | String | | yes | GitHub Repository Name |
|
||||||
|
|
||||||
## Example usage
|
## Example usage
|
||||||
|
|
||||||
@ -23,4 +25,6 @@ jobs:
|
|||||||
uses: ednxzu/action-galaxy-role-import@v1
|
uses: ednxzu/action-galaxy-role-import@v1
|
||||||
with:
|
with:
|
||||||
galaxy-api-key: ${{ secrets.galaxy_api_key }}
|
galaxy-api-key: ${{ secrets.galaxy_api_key }}
|
||||||
|
repository-owner: <github_owner_name>
|
||||||
|
repository-name: <github_repository_name>
|
||||||
```
|
```
|
@ -7,9 +7,17 @@ inputs:
|
|||||||
galaxy-api-key:
|
galaxy-api-key:
|
||||||
required: true
|
required: true
|
||||||
description: The key to use to authenticate against ansible-galaxy
|
description: The key to use to authenticate against ansible-galaxy
|
||||||
|
repository-owner:
|
||||||
|
required: true
|
||||||
|
description: The owner of the repository from which to import the role
|
||||||
|
repository-name:
|
||||||
|
required: true
|
||||||
|
description: The name of the repository from which to import the role
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: docker
|
using: docker
|
||||||
image: Dockerfile
|
image: Dockerfile
|
||||||
env:
|
env:
|
||||||
GALAXY_API_TOKEN: ${{ inputs.galaxy-api-key }}
|
GALAXY_API_TOKEN: ${{ inputs.galaxy-api-key }}
|
||||||
|
GALAXY_REPOSITORY_OWNER: ${{ inputs.repository-owner }}
|
||||||
|
GALAXY_REPOSITORY_NAME: ${{ inputs.repository-name }}
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
set -e
|
set -e
|
||||||
command_string="ansible-galaxy role import"
|
ansible_galaxy_command_string="ansible-galaxy role import"
|
||||||
|
command_string="$ansible_galaxy_command_string --api-key ${GALAXY_API_TOKEN} ${GALAXY_REPOSITORY_OWNER} ${GALAXY_REPOSITORY_NAME}"
|
||||||
if [ -n "${GALAXY_API_TOKEN}" ]; then
|
|
||||||
command_string="$command_string --api-key ${GALAXY_API_TOKEN} ${GITHUB_REPOSITORY%/*} ${GITHUB_REPOSITORY#*/}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Command: $command_string"
|
echo "Command: $command_string"
|
||||||
eval "$command_string"
|
eval "$command_string"
|
||||||
|
Loading…
Reference in New Issue
Block a user