Skip to content

Compatibility Check

Compatibility Check #3

name: Compatibility Check
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to run the workflow on'
required: true
default: 'main'
schedule:
# Schedule to run at 00:00 on the 1st of every month
- cron: '0 0 1 * *'
jobs:
compatibility-check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}
- name: Install jq
run: sudo apt-get update && sudo apt-get install jq -y
- name: Run Compatibility Matrix Script
run: sudo bash compatibility_matrix.sh 3
- name: Commit and Push if not on main branch
env:
MY_PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
if: github.ref_name != 'main'
run: |
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
git add .
git commit -m "Update compatibility matrix and badges" -a || echo "No changes to commit"
git push https://${MY_PERSONAL_TOKEN}@github.com/${{ github.repository }} HEAD:${{ github.ref_name }}