Skip to content

Matrix

Matrix #15

Workflow file for this run

name: Matrix
on:
workflow_dispatch:
inputs:
images:
type: string
required: true
description: 'Distribution(s) to build'
default: '["ubuntu22-full-x64", "ubuntu22-full-arm64", "ubuntu24-full-x64", "ubuntu24-full-arm64"]'
schedule:
- cron: '0 8 */15 * *'
jobs:
sync:
name: Synchronize
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
release_name: ${{ steps.generate-release-name.outputs.release_name }}
steps:
- name: Generate release name
id: generate-release-name
run: echo "release_name=$(date +%Y%m%d%H%M%S)" >> $GITHUB_OUTPUT
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.2
bundler-cache: true
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Cleanup dev AMIs
env:
AMI_PREFIX: runs-on-dev
run: bundle exec bin/utils/cleanup-amis --force
- name: Synchronize with upstream repository
run: bundle exec bin/sync
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Sync from upstream"
tagging_message: ${{ steps.generate-release-name.outputs.release_name }}
build-test-release:
name: Build/Test/Release ${{ matrix.image_id }}
needs: sync
strategy:
fail-fast: false
matrix:
image_id: ${{ fromJSON(github.event.inputs.images || '["ubuntu22-full-x64", "ubuntu22-full-arm64", "ubuntu24-full-x64", "ubuntu24-full-arm64"]') }}
uses: ./.github/workflows/build-test-release.yml
secrets: inherit
with:
image_id: ${{ matrix.image_id }}
generate-release:
name: Generate release
needs:
- sync
- build-test-release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
tag_name: ${{ needs.sync.outputs.release_name }}
make_latest: true