Skip to content

Rebuild CI images

Rebuild CI images #15

Workflow file for this run

name: Rebuild CI images
# NOTE(mikal): git repos are checked out to /srv/github/_work/{repo}/{repo}
# which is available as GITHUB_WORKSPACE. You can find other environment
# variables at https://docs.github.com/en/actions/learn-github-actions/environment-variables
on:
workflow_dispatch:
schedule:
- cron: '11 0 * * *' # utc
jobs:
image_build_matrix:
name: "${{ matrix.os.name }}"
strategy:
fail-fast: false
matrix:
os: [
{
'name': 'debian-11',
'baseimage': 'debian:11',
'baseuser': 'debian',
'outputlabel': 'ci-images/debian-11',
'scheduled': True
},
{
'name': 'debian-12',
'baseimage': 'debian:12',
'baseuser': 'debian',
'outputlabel': 'ci-images/debian-12',
'scheduled': True
},
{
'name': 'rocky-9',
'baseimage': 'rocky:9',
'baseuser': 'cloud-user',
'outputlabel': 'ci-images/rocky-9',
'scheduled': True
},
{
'name': 'ubuntu-2004',
'baseimage': 'ubuntu:20.04',
'baseuser': 'ubuntu',
'outputlabel': 'ci-images/ubuntu-2004',
'scheduled': True
},
{
'name': 'ubuntu-2204',
'baseimage': 'ubuntu:22.04',
'baseuser': 'ubuntu',
'outputlabel': 'ci-images/ubuntu-2204',
'scheduled': True
},
]
runs-on: [self-hosted, vm]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os.name }}
cancel-in-progress: true
steps:
- name: Set environment variables
run: |
echo "SHAKENFIST_NAMESPACE=$(hostname)" >> $GITHUB_ENV
- name: Checkout the actions repository
uses: actions/checkout@v4
with:
repository: shakenfist/actions
path: actions
fetch-depth: 0
- name: Build image
run: |
cd ${GITHUB_WORKSPACE}/actions
ansible-playbook -i /home/debian/ansible-hosts \
--extra-vars "identifier=${SHAKENFIST_NAMESPACE} source_path=${GITHUB_WORKSPACE} \
base_image=${{ matrix.os.baseimage }} base_image_user=${{ matrix.os.baseuser }} label=${{ matrix.os.outputlabel }}" \
ansible/ci-image.yml
- uses: JasonEtco/create-an-issue@v2
if: failure()
id: create-issue
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SF_CI_NAME: ${{ matrix.os.name }}
SF_ACTION_RUN: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
with:
filename: shakenfist/.github/workflows/ci-images-failure.md
update_existing: true
search_existing: open
- if: failure()
run: 'echo Created ${{ steps.create-issue.outputs.url }}'