Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 4, 2025

  • Explore repository structure and understand codebase
  • Create .github/docker/ directory
  • Create fedora-ansible-43.Dockerfile with Fedora 43, Python, and Ansible
  • Create .github/workflows/ansible-site-test.yml workflow with:
    • build-ansible-base-image job to build and push GHCR image
    • ansible-site-test job to test ansible-playbook site.yml
  • Verify YAML and Dockerfile syntax
  • Run code review and address feedback
  • Run security checks and fix issues
  • Fix GHCR image name by converting repository name to lowercase (fixes CI failure)
  • Use latest tag for test job container
Original prompt

This section details on the original issue you should resolve

<issue_title>Create GitHub action image that can get on the Tailnet and interact with Homelab devices</issue_title>
<issue_description>Title: Create Fedora 43 Ansible base image and GitHub Actions site.yml test job

Goal

Provide a reusable Fedora 43 base container for GitHub Actions, preinstalled with Python and Ansible, and a simple CI job that runs ansible/site.yml as a smoke test.


Base image requirements

Create a Dockerfile (e.g. ./.github/docker/fedora-ansible-43.Dockerfile) that:

  • Uses fedora:43 as the base image.

  • Runs dnf -y upgrade to update all packages.

  • Installs:

    • python3
    • python3-pip
    • ansible (Fedora package, not pip).
  • Cleans up dnf caches to keep the image small.

Publish this image to GHCR so Actions jobs can use it directly:

  • Image name: ghcr.io/<org>/<repo>/fedora-ansible-43-ansible:latest

  • Add a workflow job (e.g. build-ansible-base-image) that:

    • Logs into GHCR using GITHUB_TOKEN.
    • Builds from ./.github/docker/fedora-ansible-43.Dockerfile.
    • Tags and pushes the image to GHCR with latest (and optionally ${{ github.sha }}).

Test job requirements

Create a workflow .github/workflows/ansible-site-test.yml that:

  • Triggers on:

    • workflow_dispatch

    • pull_request and push that touch:

      • ansible/**
      • site.yml
      • .github/workflows/ansible-site-test.yml
  • Has two jobs:

  1. build-ansible-base-image

    • Runs on ubuntu-latest.
    • Builds and pushes the GHCR image described above.
    • Uses GITHUB_TOKEN for docker login.
  2. ansible-site-test

    • needs: build-ansible-base-image.

    • runs-on: ubuntu-latest.

    • Uses the GHCR image as the job container:

      • container.image: ghcr.io/<org>/<repo>/fedora-ansible-43-ansible:latest
    • Steps:

      1. Checkout the repo (actions/checkout).

      2. cd ansible and run:

        • ansible-playbook site.yml
    • Fail the job if ansible-playbook exits non-zero.


Acceptance criteria

  • Running the workflow on workflow_dispatch:

    • Builds and pushes the Fedora 43 Ansible base image to GHCR.
    • Starts the ansible-site-test job using that image.
    • Successfully runs ansible-playbook site.yml from the ansible directory.
  • Subsequent runs reuse the GHCR image without needing code changes.
    </issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits December 4, 2025 01:00
Co-authored-by: SRF-Audio <16975040+SRF-Audio@users.noreply.github.com>
Co-authored-by: SRF-Audio <16975040+SRF-Audio@users.noreply.github.com>
Co-authored-by: SRF-Audio <16975040+SRF-Audio@users.noreply.github.com>
Copilot AI changed the title [WIP] Create Fedora 43 Ansible base image for GitHub Actions Add Fedora 43 Ansible base image and GitHub Actions test workflow Dec 4, 2025
Copilot AI requested a review from SRF-Audio December 4, 2025 01:03
Copilot finished work on behalf of SRF-Audio December 4, 2025 01:03
@SRF-Audio SRF-Audio marked this pull request as ready for review December 5, 2025 04:23
Copilot AI and others added 2 commits December 5, 2025 04:54
Co-authored-by: SRF-Audio <16975040+SRF-Audio@users.noreply.github.com>
Co-authored-by: SRF-Audio <16975040+SRF-Audio@users.noreply.github.com>
Copilot AI requested a review from SRF-Audio December 5, 2025 04:57
Copilot finished work on behalf of SRF-Audio December 5, 2025 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create GitHub action image that can get on the Tailnet and interact with Homelab devices

2 participants