Skip to content

Commit

Permalink
Merge pull request #210 from lewismiddleton/parameterise-tests
Browse files Browse the repository at this point in the history
feat(ci): parameterise out github account
  • Loading branch information
MonolithProjects authored May 24, 2024
2 parents b33b8e0 + ef5aee2 commit b95b43c
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 21 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ jobs:
MOLECULE_DOCKER_CGROUPS_MODE: ${{ matrix.config.cgroup_mode }}
MOLECULE_DOCKER_VOLUMES: ${{ matrix.config.volumes }}
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
GITHUB_ACCOUNT: monolithprojects-testorg
GITHUB_REPO: ansible-github_actions_runner-testrepo

org:
name: Test Org Runner
Expand Down Expand Up @@ -104,3 +106,5 @@ jobs:
MOLECULE_DOCKER_CGROUPS_MODE: ${{ matrix.config.cgroup_mode }}
MOLECULE_DOCKER_VOLUMES: ${{ matrix.config.volumes }}
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
GITHUB_ACCOUNT: monolithprojects-testorg
GITHUB_REPO: ansible-github_actions_runner-testrepo
4 changes: 2 additions & 2 deletions molecule/custom_env/cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
become: yes
vars:
runner_user: ansible
github_repo: ansible-github_actions_runner-testrepo
github_account: monolithprojects-testorg
github_repo: "{{ lookup('env', 'GITHUB_REPO') }}"
github_account: "{{ lookup('env', 'GITHUB_ACCOUNT') }}"
runner_state: absent
roles:
- monolithprojects.github_actions_runner
4 changes: 2 additions & 2 deletions molecule/custom_env/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
become: yes
vars:
runner_user: ansible
github_repo: ansible-github_actions_runner-testrepo
github_account: monolithprojects-testorg
github_repo: "{{ lookup('env', 'GITHUB_REPO') }}"
github_account: "{{ lookup('env', 'GITHUB_ACCOUNT') }}"
runner_version: "latest"
runner_labels:
- label1
Expand Down
4 changes: 2 additions & 2 deletions molecule/custom_env/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
become: yes
vars:
runner_user: ansible
github_repo: ansible-github_actions_runner-testrepo
github_account: monolithprojects-testorg
github_repo: "{{ lookup('env', 'GITHUB_REPO') }}"
github_account: "{{ lookup('env', 'GITHUB_ACCOUNT') }}"
github_api_url: "https://api.github.com"
access_token: "{{ lookup('env', 'PERSONAL_ACCESS_TOKEN') }}"
runner_name: ubuntu16-latest
Expand Down
4 changes: 2 additions & 2 deletions molecule/default/cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
become: yes
vars:
runner_user: ansible
github_repo: ansible-github_actions_runner-testrepo
github_account: monolithprojects-testorg
github_repo: "{{ lookup('env', 'GITHUB_REPO') }}"
github_account: "{{ lookup('env', 'GITHUB_ACCOUNT') }}"
runner_state: absent
runner_name: test_name
roles:
Expand Down
4 changes: 2 additions & 2 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
become: yes
vars:
runner_user: ansible
github_repo: ansible-github_actions_runner-testrepo
github_account: monolithprojects-testorg
github_repo: "{{ lookup('env', 'GITHUB_REPO') }}"
github_account: "{{ lookup('env', 'GITHUB_ACCOUNT') }}"
runner_version: "latest"
runner_name: test_name
runner_on_ghes: yes
Expand Down
4 changes: 2 additions & 2 deletions molecule/default/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
become: yes
vars:
runner_user: ansible
github_repo: ansible-github_actions_runner-testrepo
github_account: monolithprojects-testorg
github_repo: "{{ lookup('env', 'GITHUB_REPO') }}"
github_account: "{{ lookup('env', 'GITHUB_ACCOUNT') }}"
github_api_url: "https://api.github.com"
access_token: "{{ lookup('env', 'PERSONAL_ACCESS_TOKEN') }}"
runner_name: ubuntu16-latest
Expand Down
2 changes: 1 addition & 1 deletion molecule/org/cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
become: yes
vars:
runner_user: ansible
github_account: monolithprojects-testorg
github_account: "{{ lookup('env', 'GITHUB_ACCOUNT') }}"
runner_org: yes
runner_state: absent
roles:
Expand Down
2 changes: 1 addition & 1 deletion molecule/org/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
become: yes
vars:
runner_user: ansible
github_account: monolithprojects-testorg
github_account: "{{ lookup('env', 'GITHUB_ACCOUNT') }}"
runner_org: yes
runner_state: "stopped"
runner_version: "2.303.0"
Expand Down
2 changes: 1 addition & 1 deletion molecule/org/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
become: yes
vars:
runner_user: ansible
github_account: monolithprojects-testorg
github_account: "{{ lookup('env', 'GITHUB_ACCOUNT') }}"
runner_org: yes
github_api_url: "https://api.github.com"
access_token: "{{ lookup('env', 'PERSONAL_ACCESS_TOKEN') }}"
Expand Down
4 changes: 2 additions & 2 deletions molecule/repo/cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
become: yes
vars:
runner_user: ansible
github_repo: ansible-github_actions_runner-testrepo
github_account: monolithprojects-testorg
github_repo: "{{ lookup('env', 'GITHUB_REPO') }}"
github_account: "{{ lookup('env', 'GITHUB_ACCOUNT') }}"
runner_state: absent
roles:
- monolithprojects.github_actions_runner
4 changes: 2 additions & 2 deletions molecule/repo/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
become: yes
vars:
runner_user: ansible
github_repo: ansible-github_actions_runner-testrepo
github_account: monolithprojects-testorg
github_repo: "{{ lookup('env', 'GITHUB_REPO') }}"
github_account: "{{ lookup('env', 'GITHUB_ACCOUNT') }}"
runner_version: "latest"
runner_labels:
- label1
Expand Down
4 changes: 2 additions & 2 deletions molecule/repo/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
become: yes
vars:
runner_user: ansible
github_repo: ansible-github_actions_runner-testrepo
github_account: monolithprojects-testorg
github_repo: "{{ lookup('env', 'GITHUB_REPO') }}"
github_account: "{{ lookup('env', 'GITHUB_ACCOUNT') }}"
github_api_url: "https://api.github.com"
access_token: "{{ lookup('env', 'PERSONAL_ACCESS_TOKEN') }}"
runner_name: "{{ ansible_facts.hostname }}"
Expand Down

0 comments on commit b95b43c

Please sign in to comment.