Merge pull request #169 from stfc/update_os_builders_readme #561
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: OS Builders PR | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| paths: | |
| - ".github/workflows/os_builder.yaml" | |
| - "os_builders/**" | |
| jobs: | |
| validate_packer: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| - name: Run prep_builder playbook | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ansible | |
| cd os_builders | |
| ansible-playbook prep_builder.yml | |
| - name: Validate packer files | |
| run: | | |
| cd os_builders && | |
| packer init . && | |
| packer validate -syntax-only . | |
| env: | |
| PACKER_GITHUB_API_TOKEN: ${{ secrets.PACKER_GITHUB_API_TOKEN }} | |
| test_image_build_ubuntu: | |
| strategy: | |
| matrix: | |
| os: ["ubuntu:22.04", "ubuntu:24.04"] | |
| runs-on: ubuntu-latest | |
| container: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| - name: Install Ansible | |
| run: | | |
| apt update | |
| apt install -y python3-pip python3-venv | |
| python3 -m venv venv | |
| . venv/bin/activate | |
| pip3 install --upgrade pip | |
| pip3 install ansible python-debian | |
| - name: Run configure_os_images playbook | |
| run: | | |
| . venv/bin/activate | |
| cd os_builders | |
| ansible-playbook configure_os_images.yml -i ../.github/localhost.yml | |
| test_image_build_rocky: | |
| strategy: | |
| matrix: | |
| os: ["rockylinux:8", "rockylinux:9"] | |
| runs-on: ubuntu-latest | |
| container: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| - name: Install Ansible | |
| run: | | |
| dnf install epel-release -y | |
| # These have to be separate steps as ansible is provided by epel-release | |
| dnf install ansible -y | |
| - name: Run configure_os_images playbook | |
| run: | | |
| cd os_builders | |
| ansible-playbook configure_os_images.yml -i ../.github/localhost.yml |