Skip to content

Weekly image build

Weekly image build #25

Workflow file for this run

---
name: Weekly image build
on:
schedule:
- cron: '22 0 * * 1' # 22 past midnight on Monday
jobs:
build_and_deploy:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
images:
- ubuntu/focal
- ubuntu/jammy
- ubuntu/focal-desktop
env:
ANSIBLE_VERSION: 2.15.5
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install specific ansible-core version
run: pip install ansible-core==${{ env.ANSIBLE_VERSION }}
- name: Debug ansible version
run: ansible-playbook --version
- name: Install ansible dependencies
run: ansible-galaxy collection install -r requirements.yml
- name: Update submodules to latest version
run: git submodule update --recursive --remote
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build image
id: build-image
run: IMG=${{ matrix.images }} ./pack.sh docker
- name: Get image name and tag # grep in the image directory's variables file to find the image name/tag to push to
id: get-image-name
run: |
echo "docker_repo=`grep docker_repo ${{ matrix.images }}/variables.auto.pkrvars.hcl | awk '{print $3}'`" >> "$GITHUB_OUTPUT"
- name: Push image
run: docker push ${{ steps.get-image-name.outputs.docker_repo }}