Late answer ...
I've played around with github actions and PHPCompatibility check these days.
If you use composer for you project, you dont need a docker image.
Add (dev) dependencies:
squizlabs/php_codesniffer
phpcompatibility/php-compatibility
(Auto-)Install PHPCompatibility (and other) rules
dealerdirect/phpcodesniffer-composer-installer
Add Workflow file to .github/workflows with ...
...
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: PHPCodeSniffer
run: php vendor/bin/phpcs <your-options>