Skip to content

Commit eb202fc

Browse files
Merge pull request #71 from MonolithProjects/main
Mysterious Ansible Galaxy issue
2 parents ec2d44c + 6ac5013 commit eb202fc

35 files changed

+360
-407
lines changed

CONTRIBUTING.md renamed to .github/CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ cd ansible-github_actions_runner
3131
molecule test
3232
```
3333

34+
> You will need to edit the files in `molecule/default` directory (please do not commit those changes)
35+
3436
## 5. Create a pull request
3537

3638
Please create a pull request into the `develop` branch. Here is [how to do it](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork).
3739

38-
3940
Please consider to [sponsor](https://github.com/sponsors/monolithprojects) me :-)

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Pull Request Template
2+
3+
## Description
4+
5+
Please include a summary of the change and which issue is fixed.
6+
7+
## Type of change
8+
9+
Please delete options that are not relevant.
10+
11+
- [ ] Bug fix (non-breaking change which fixes an issue)
12+
- [ ] New feature (non-breaking change which adds functionality)
13+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
14+
- [ ] This change requires a documentation update
15+
16+
## How Has This Been Tested?
17+
18+
Please describe the tests that you ran to verify your changes.
19+
20+
## Destination branch
21+
22+
Create a PR into `develop` branch

.github/workflows/galaxy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
release:
11-
runs-on: ubuntu-18.04
11+
runs-on: ubuntu-20.04
1212
steps:
1313
- name: galaxy
1414
uses: robertdebock/[email protected]

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
types: [opened, synchronize, reopened]
1212
jobs:
1313
lint:
14-
runs-on: ubuntu-18.04
14+
runs-on: ubuntu-20.04
1515
strategy:
1616
fail-fast: true
1717
steps:
@@ -20,6 +20,6 @@ jobs:
2020
with:
2121
path: "${{ github.repository }}"
2222
- name: Molecule for Ansible - lint
23-
uses: MonolithProjects/[email protected].0
23+
uses: MonolithProjects/[email protected].1
2424
with:
2525
molecule_command: lint

.github/workflows/main.yml

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,41 +3,61 @@ name: molecule test
33
on:
44
pull_request:
55
branches:
6-
- master
6+
- main
77
types: [opened, synchronize, reopened]
88
schedule:
99
- cron: '0 6 * * 0'
1010
jobs:
1111
repo:
1212
name: Test Repo Runner
13-
runs-on: ubuntu-18.04
13+
runs-on: ubuntu-20.04
1414
strategy:
15-
fail-fast: true
15+
fail-fast: false
16+
matrix:
17+
config:
18+
- os: "centos7"
19+
tag: "latest"
20+
- os: "centos8"
21+
tag: "latest"
22+
- os: "debian9"
23+
tag: "latest"
24+
- os: "debian10"
25+
tag: "latest"
26+
- os: "fedora33"
27+
tag: "latest"
28+
- os: "ubuntu18"
29+
tag: "latest"
30+
- os: "ubuntu20"
31+
tag: "latest"
1632
steps:
1733
- name: checkout
1834
uses: actions/checkout@v2
1935
with:
2036
path: "${{ github.repository }}"
2137
- name: Molecule for Ansible - GHR Repository
22-
uses: MonolithProjects/[email protected].0
38+
uses: MonolithProjects/[email protected].1
2339
env:
2440
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
2541
with:
42+
os: ${{ matrix.config.os }}
43+
tag: ${{ matrix.config.tag }}
2644
molecule_command: test
45+
scenario: repo
46+
2747
org:
2848
name: Test Org Runner
29-
runs-on: ubuntu-18.04
49+
runs-on: ubuntu-20.04
3050
strategy:
31-
fail-fast: true
51+
fail-fast: false
3252
steps:
3353
- name: checkout
3454
uses: actions/checkout@v2
3555
with:
3656
path: "${{ github.repository }}"
3757
- name: Molecule for Ansible - GHR Organization
38-
uses: MonolithProjects/[email protected].0
58+
uses: MonolithProjects/[email protected].1
3959
env:
4060
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
4161
with:
4262
molecule_command: test
43-
scenario: organization
63+
scenario: org

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
[![Galaxy Quality](https://img.shields.io/ansible/quality/47375?style=flat&logo=ansible)](https://galaxy.ansible.com/monolithprojects/github_actions_runner)
55
[![Role version](https://img.shields.io/github/v/release/MonolithProjects/ansible-github_actions_runner)](https://galaxy.ansible.com/monolithprojects/github_actions_runner)
66
[![Role downloads](https://img.shields.io/ansible/role/d/47375)](https://galaxy.ansible.com/monolithprojects/github_actions_runner)
7-
[![GitHub Actions](https://github.com/MonolithProjects/ansible-github_actions_runner/workflows/molecule%20test/badge.svg?branch=master)](https://github.com/MonolithProjects/ansible-github_actions_runner/actions)
8-
[![License](https://img.shields.io/github/license/MonolithProjects/ansible-github_actions_runner)](https://github.com/MonolithProjects/ansible-github_actions_runner/blob/master/LICENSE)
7+
[![GitHub Actions](https://github.com/MonolithProjects/ansible-github_actions_runner/workflows/molecule%20test/badge.svg?branch=main)](https://github.com/MonolithProjects/ansible-github_actions_runner/actions)
8+
[![License](https://img.shields.io/github/license/MonolithProjects/ansible-github_actions_runner)](https://github.com/MonolithProjects/ansible-github_actions_runner/blob/main/LICENSE)
99

1010

1111
This role will deploy/redeploy/uninstall and register/unregister local GitHub Actions Runner.
@@ -32,7 +32,7 @@ Personal Access Token for GitHub account can be created [here](https://github.co
3232

3333
* ARM, ARM64 (dependencies installation is not covered by this role)
3434
* AMD64, x86_64
35-
## Weekly tested on:
35+
## Tested on:
3636

3737
* CentOS/RHEL 7,8
3838
* Debian 9,10
@@ -83,7 +83,7 @@ runner_org: no
8383
runner_name: "{{ ansible_hostname }}"
8484

8585
# Labels to apply to the runner
86-
runner_labels: "''"
86+
runner_labels: []
8787

8888
# Custom service name when usign Github Enterprise server
8989
# service_name: actions.runner._services.{{ runner_name }}.service
@@ -131,8 +131,8 @@ Same example as above, but runner will be added to an organization.
131131
- role: monolithprojects.github_actions_runner
132132
```
133133
134-
In this example the Ansible role will deploy (or update) the GitHub Actions runner service (version 2.165.2) and register the runner for the GitHub repo. Runner service will run under the user `runner-user`.
135-
The runner service will be *stopped*.
134+
In this example the Ansible role will deploy (or update) the GitHub Actions runner service (version 2.165.2) and register the runner for the GitHub repo. Runner service will run under the user `runner-user`. Runner will be registered with two labels.
135+
The runner service will be *stopped* and disabled.
136136

137137
```yaml
138138
---
@@ -145,6 +145,9 @@ The runner service will be *stopped*.
145145
- github_account: github-access-user
146146
- github_repo: my_awesome_repo
147147
- runner_state: "stopped"
148+
- runner_labels:
149+
- production
150+
- west
148151
roles:
149152
- role: monolithprojects.github_actions_runner
150153
```

defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ runner_org: no
3636
runner_name: "{{ ansible_hostname }}"
3737

3838
# Labels to apply to the runner
39-
runner_labels: "''"
39+
runner_labels: []
4040

4141
# Custom service name when usign Github Enterprise server
4242
# service_name: actions.runner._services.{{ runner_name }}.service

handlers/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
# handlers file for ansible-github_actions_runner
2+
# handlers file for ansible-github_actions_runner (currently not used)
33
- name: Restart runner service
44
service:
55
name: "{{ runner_service }}"

meta/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
galaxy_info:
33
author: Michal Muransky
4-
role_name: Github_Actions_runner
4+
role_name: github_actions_runner
55
description: Deploy Github Actions private runner
66
company: MonolithProjects
77
license: "license (MIT)"

molecule/default/Dockerfile.j2

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)