You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+54-1Lines changed: 54 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,22 @@
1
1
# aap_controller_action
2
2
Github Action for Ansible Automation Platform - Automation controller
3
3
4
+
## Table of Contents
5
+
*[Example use-cases](#example-use-cases)
6
+
*[Example of kicking off an automation job on Automation controller](#example-of-kicking-off-an-automation-job-on-automation-controller)
7
+
*[Example of working with a Pull Request Methodology](#example-of-working-with-a-pull-request-methodology)
8
+
*[Setting up your repo to work with this action](#setting-up-your-repo-to-work-with-this-action)
9
+
*[I need help!](#i-need-help)
10
+
## Example use-cases
4
11
12
+
### Example of kicking off an automation job on Automation controller
5
13
6
-
## Example of kicking off an automation job on Automation controller
14
+
This would be equivalent of using an Automation controller webhook, but with the added benefit of the output from the job added to Github without additional playbooks needing to be written.
7
15
16
+
Example of `.github/workflows/main.yml`
8
17
```
18
+
on: push
19
+
9
20
jobs:
10
21
automation_controller_job:
11
22
runs-on: ubuntu-latest
@@ -23,6 +34,44 @@ jobs:
23
34
validate_certs: false
24
35
```
25
36
37
+
### Example of working with a Pull Request Methodology
38
+
39
+
In this example we will only initiate the Github Action if there is a Pull Request on our Github repository. We need to have a `job_template` and `controller_project` specified. This will make sure that any in-bound pull requests (PRs) are tested rather than your existing project. This will allow people contributing to your Github repo to test their changes before you merge into your downstream repoistory.

69
+
70
+
For the Github Pull Request method to work, you need to make sure your specified **JOB TEMPLATE** has **Prompt on launch** set for both
71
+
72
+
***Source Control Branch** (which requires the **PROJECT** to have Allow Branch Override checked)
73
+
***Variables**
74
+
26
75
## Setting up your repo to work with this action
27
76
28
77
You need to setup 3 (three) secrets:
@@ -34,3 +83,7 @@ You need to setup 3 (three) secrets:
34
83
Example screenshot of Github Secrets
35
84
36
85

86
+
87
+
## I need help!
88
+
89
+
Open an [issue](https://github.com/ansible-cloud/aap_controller_action/issues) or join us on [Slack](https://join.slack.com/t/ansiblenetwork/shared_invite/zt-3zeqmhhx-zuID9uJqbbpZ2KdVeTwvzw)
0 commit comments