Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the CI build to pass extra parameters in JSON #219

Merged
merged 5 commits into from
Dec 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@
- name: Login to GHCR
run: echo "${{ secrets.GITHUB_TOKEN }}" | sudo podman login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Create container
run: sudo podman create --name ${{ matrix.version }} --privileged --device /dev/net/tun --cgroupns=host --network=host --systemd=always --volume=${GITHUB_WORKSPACE}:/etc/ansible/roles/ansible-role-openvpn
run: sudo podman create --name ${{ matrix.version }} --privileged --device /dev/net/tun --cgroupns=host --network=bridge --systemd=always --volume=${GITHUB_WORKSPACE}:/etc/ansible/roles/ansible-role-openvpn

Check warning on line 211 in .github/workflows/ci.yml

View workflow job for this annotation

GitHub Actions / check-syntax

yaml[line-length]

Line too long (214 > 160 characters)
--user=root ghcr.io/kyl191/ansible-fedora:${{ matrix.version }}
- name: Start container
run: sudo podman start ${{ matrix.version }}
Expand All @@ -217,14 +217,18 @@
run: while [ "$(sudo podman exec ${{ matrix.version }} systemctl is-system-running)" != "running" ]; do sleep 5; done
- name: Install firewalld
run: sudo podman exec ${{ matrix.version }} dnf -y install firewalld python3-firewall procps-ng
- name: Install iproute so ansible can discover interfaces
run: sudo podman exec ${{ matrix.version }} dnf -y install iproute
- name: Install required dependencies from Ansible Galaxy
run: sudo podman exec ${{ matrix.version }} ansible-galaxy install -r /etc/ansible/roles/ansible-role-openvpn/requirements.yml
- name: Make sure ansible connection is sane
run: sudo podman exec ${{ matrix.version }} ansible -m setup -c local -i 127.0.0.1, all
- name: Run ansible playbook
run: sudo podman exec ${{ matrix.version }} ansible-playbook /etc/ansible/roles/ansible-role-openvpn/tests/test.yml -vv -e openvpn_ci_build=False
run: >
sudo podman exec ${{ matrix.version }} ansible-playbook /etc/ansible/roles/ansible-role-openvpn/tests/test.yml -vv -e '{"openvpn_ci_build": false}'
- name: Check idempotency
run: sudo podman exec ${{ matrix.version }} ansible-playbook /etc/ansible/roles/ansible-role-openvpn/tests/test.yml -vv -e openvpn_ci_build=False
run: >
sudo podman exec ${{ matrix.version }} ansible-playbook /etc/ansible/roles/ansible-role-openvpn/tests/test.yml -vv -e '{"openvpn_ci_build": false}'
- name: Move generated client config file
run: sudo podman exec ${{ matrix.version }} cp /etc/openvpn/server/alpha-localhost.ovpn /etc/openvpn/client/alpha-localhost.conf
- name: Attempt openvpn connection
Expand Down
Loading