Skip to content

Commit

Permalink
Merge branch 'gh-actions' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
ahembree authored Dec 12, 2023
2 parents d6a55b2 + da4a697 commit ea7ee7f
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/run-playbook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: GitHub Actions Testing
run-name: Test OS Deployments
on:
push:
workflow_dispatch:

permissions:
contents: read

jobs:
Ubuntu22:
runs-on: ubuntu-22.04
steps:
- name: Check out repo code
uses: actions/checkout@v4
- name: Install ansible
run: |
sudo apt update
sudo apt install ansible
- name: Run playbook
run: |
sudo ansible-playbook -i inventory --connection local hms-docker.yml --diff --extra-vars "hms_docker_compose_container_state=absent hms_docker_container_map.transmission.enabled=no hms_docker_container_map.plex.enabled=no is_github_runner=yes"
Ubuntu20:
runs-on: ubuntu-20.04
steps:
- name: Check out repo code
uses: actions/checkout@v4
- name: Install ansible
run: |
sudo apt update
sudo apt install ansible
- name: Run playbook
run: |
sudo ansible-playbook -vvv -i inventory --connection local hms-docker.yml --diff --extra-vars "hms_docker_compose_container_state=absent hms_docker_container_map.transmission.enabled=no hms_docker_container_map.plex.enabled=no is_github_runner=yes"
5 changes: 4 additions & 1 deletion roles/hmsdocker/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@
state: "{{ hms_docker_compose_container_state }}"
remove_orphans: "{{ container_remove_orphans }}"
# env_file: "{{ compose_env.dest }}" # Commented out since this module defaults to using the .env file within the project_src location, but leaving just in case advanced users wish to point to a different location
when: not ansible_check_mode
when:
- not ansible_check_mode
- not is_github_runner|default(false)

- name: Sabnzbd additional config
when: container_enabled_sabnzbd
Expand Down Expand Up @@ -142,3 +144,4 @@
when:
- container_enabled_transmission
- not ansible_check_mode
- not is_github_runner|default(false)

0 comments on commit ea7ee7f

Please sign in to comment.