Setup for composer projects#
See github-composer-release-test as an example project.
Manage access#
In packagist.org a user sitepark is created. It is linked to the GitHub user sitepark-bot to manage the webhooks for packagist.org. See also: How to update packages?
To manage the webhook of a composer project, the sitepark-bot needs the admin role on the project. It gets this role through the team bots, see Manage access. Without the admin role, packagist.org is not updated after a release.
Status checks#
The action (📡) Verify runs one job per PHP version configured in phpVersions of the .github/workflows/verify.yml:
jobs:
verify:
uses: sitepark/github-project-workflow/.github/workflows/composer-verify.yml@release/1.x
with:
phpVersions: '["8.2","8.3","8.4"]'
Each job is reported as the status check verify / Composer Verify (PHP x.y). Add these status checks as required status checks to the main-Branch protection. If a PHP version is added to phpVersions, it only becomes a required status check once it is also added to the branch protection.
Register to packagist.org#
Log in to GitHub as sitepark-bot first, then log in to packagist.org via GitHub.
Submit the package: https://packagist.org/packages/submit
Sync the package in the profile to add the webhook: https://packagist.org/profile/
Register to app.snyk.io#
Log in with a user who has administration rights for the GitHub organization sitepark. Add the project.