Skip to content

Commit b95b43c

Browse files
Merge pull request #210 from lewismiddleton/parameterise-tests
feat(ci): parameterise out github account
2 parents b33b8e0 + ef5aee2 commit b95b43c

13 files changed

+25
-21
lines changed

.github/workflows/tests.yml

+4
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ jobs:
6363
MOLECULE_DOCKER_CGROUPS_MODE: ${{ matrix.config.cgroup_mode }}
6464
MOLECULE_DOCKER_VOLUMES: ${{ matrix.config.volumes }}
6565
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
66+
GITHUB_ACCOUNT: monolithprojects-testorg
67+
GITHUB_REPO: ansible-github_actions_runner-testrepo
6668

6769
org:
6870
name: Test Org Runner
@@ -104,3 +106,5 @@ jobs:
104106
MOLECULE_DOCKER_CGROUPS_MODE: ${{ matrix.config.cgroup_mode }}
105107
MOLECULE_DOCKER_VOLUMES: ${{ matrix.config.volumes }}
106108
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
109+
GITHUB_ACCOUNT: monolithprojects-testorg
110+
GITHUB_REPO: ansible-github_actions_runner-testrepo

molecule/custom_env/cleanup.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
become: yes
66
vars:
77
runner_user: ansible
8-
github_repo: ansible-github_actions_runner-testrepo
9-
github_account: monolithprojects-testorg
8+
github_repo: "{{ lookup('env', 'GITHUB_REPO') }}"
9+
github_account: "{{ lookup('env', 'GITHUB_ACCOUNT') }}"
1010
runner_state: absent
1111
roles:
1212
- monolithprojects.github_actions_runner

molecule/custom_env/converge.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
become: yes
77
vars:
88
runner_user: ansible
9-
github_repo: ansible-github_actions_runner-testrepo
10-
github_account: monolithprojects-testorg
9+
github_repo: "{{ lookup('env', 'GITHUB_REPO') }}"
10+
github_account: "{{ lookup('env', 'GITHUB_ACCOUNT') }}"
1111
runner_version: "latest"
1212
runner_labels:
1313
- label1

molecule/custom_env/verify.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
become: yes
77
vars:
88
runner_user: ansible
9-
github_repo: ansible-github_actions_runner-testrepo
10-
github_account: monolithprojects-testorg
9+
github_repo: "{{ lookup('env', 'GITHUB_REPO') }}"
10+
github_account: "{{ lookup('env', 'GITHUB_ACCOUNT') }}"
1111
github_api_url: "https://api.github.com"
1212
access_token: "{{ lookup('env', 'PERSONAL_ACCESS_TOKEN') }}"
1313
runner_name: ubuntu16-latest

molecule/default/cleanup.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
become: yes
66
vars:
77
runner_user: ansible
8-
github_repo: ansible-github_actions_runner-testrepo
9-
github_account: monolithprojects-testorg
8+
github_repo: "{{ lookup('env', 'GITHUB_REPO') }}"
9+
github_account: "{{ lookup('env', 'GITHUB_ACCOUNT') }}"
1010
runner_state: absent
1111
runner_name: test_name
1212
roles:

molecule/default/converge.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
become: yes
77
vars:
88
runner_user: ansible
9-
github_repo: ansible-github_actions_runner-testrepo
10-
github_account: monolithprojects-testorg
9+
github_repo: "{{ lookup('env', 'GITHUB_REPO') }}"
10+
github_account: "{{ lookup('env', 'GITHUB_ACCOUNT') }}"
1111
runner_version: "latest"
1212
runner_name: test_name
1313
runner_on_ghes: yes

molecule/default/verify.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
become: yes
77
vars:
88
runner_user: ansible
9-
github_repo: ansible-github_actions_runner-testrepo
10-
github_account: monolithprojects-testorg
9+
github_repo: "{{ lookup('env', 'GITHUB_REPO') }}"
10+
github_account: "{{ lookup('env', 'GITHUB_ACCOUNT') }}"
1111
github_api_url: "https://api.github.com"
1212
access_token: "{{ lookup('env', 'PERSONAL_ACCESS_TOKEN') }}"
1313
runner_name: ubuntu16-latest

molecule/org/cleanup.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
become: yes
66
vars:
77
runner_user: ansible
8-
github_account: monolithprojects-testorg
8+
github_account: "{{ lookup('env', 'GITHUB_ACCOUNT') }}"
99
runner_org: yes
1010
runner_state: absent
1111
roles:

molecule/org/converge.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
become: yes
66
vars:
77
runner_user: ansible
8-
github_account: monolithprojects-testorg
8+
github_account: "{{ lookup('env', 'GITHUB_ACCOUNT') }}"
99
runner_org: yes
1010
runner_state: "stopped"
1111
runner_version: "2.303.0"

molecule/org/verify.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
become: yes
77
vars:
88
runner_user: ansible
9-
github_account: monolithprojects-testorg
9+
github_account: "{{ lookup('env', 'GITHUB_ACCOUNT') }}"
1010
runner_org: yes
1111
github_api_url: "https://api.github.com"
1212
access_token: "{{ lookup('env', 'PERSONAL_ACCESS_TOKEN') }}"

molecule/repo/cleanup.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
become: yes
66
vars:
77
runner_user: ansible
8-
github_repo: ansible-github_actions_runner-testrepo
9-
github_account: monolithprojects-testorg
8+
github_repo: "{{ lookup('env', 'GITHUB_REPO') }}"
9+
github_account: "{{ lookup('env', 'GITHUB_ACCOUNT') }}"
1010
runner_state: absent
1111
roles:
1212
- monolithprojects.github_actions_runner

molecule/repo/converge.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
become: yes
77
vars:
88
runner_user: ansible
9-
github_repo: ansible-github_actions_runner-testrepo
10-
github_account: monolithprojects-testorg
9+
github_repo: "{{ lookup('env', 'GITHUB_REPO') }}"
10+
github_account: "{{ lookup('env', 'GITHUB_ACCOUNT') }}"
1111
runner_version: "latest"
1212
runner_labels:
1313
- label1

molecule/repo/verify.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
become: yes
77
vars:
88
runner_user: ansible
9-
github_repo: ansible-github_actions_runner-testrepo
10-
github_account: monolithprojects-testorg
9+
github_repo: "{{ lookup('env', 'GITHUB_REPO') }}"
10+
github_account: "{{ lookup('env', 'GITHUB_ACCOUNT') }}"
1111
github_api_url: "https://api.github.com"
1212
access_token: "{{ lookup('env', 'PERSONAL_ACCESS_TOKEN') }}"
1313
runner_name: "{{ ansible_facts.hostname }}"

0 commit comments

Comments
 (0)