Skip to content

Commit

Permalink
Merge pull request #55 from MonolithProjects/develop
Browse files Browse the repository at this point in the history
Added variables validation
  • Loading branch information
MonolithProjects authored Dec 24, 2020
2 parents 5779228 + 93e1758 commit 5a92df5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: molecule test

on:
push:
branches:
- master
pull_request:
branches:
- master
Expand Down
12 changes: 12 additions & 0 deletions tasks/assert.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
- name: Check variables
assert:
that:
- github_account is defined
- access_token is defined
- access_token | length > 0
quiet: true
run_once: yes
tags:
- install
- uninstall
2 changes: 1 addition & 1 deletion tasks/collect_info_org.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

- name: Build service name
set_fact:
runner_service: "actions.runner.{{ github_owner | default(github_account[:45]) }}.{{ runner_name }}.service"
runner_service: "actions.runner.{{ (github_owner | default(github_account))[:45] }}.{{ runner_name }}.service"
tags:
- install
- uninstall
5 changes: 5 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
---
- include_tasks: assert.yml
tags:
- install
- uninstall

- include_tasks: collect_info_org.yml
when: runner_org
tags:
Expand Down

0 comments on commit 5a92df5

Please sign in to comment.