A template repository preconfigured to automatically build Cygwin Cygport files.
The Cygwin Cygport Workflow Template
is designed to automatically generate
Cygwin Cygport packages
for *.cygport
file(s) contained in the root of the repository.
Any Cygwin Cygport files (with a *.cygport
extension) created within the root
directroy will be automatically build for all supported architectures
(currently “x86” and “x86_64”) by a GitHub Workflow upon a push, a pull
request, or a manual workflow invocation request.
By completing a few additional steps, any repositories created from this template can be configured to check for updates to the original template repository.
- Checks weekly by default, or can also be invoked manually
- If updates are found, the changes are posted as a pull request
- If during a subsequent run additional changes are found but an unapplied pull requests with updates is still pending, the old pull request will be removed and replace with a single new pull request that combines all pending updates.
- Neither this README.md file nor any files added to a repository created from this template will be impacted by this template synchronization process. (Feel free to replace this README.md with your own project-specific one.)
For general template synchronization senarios, modifying the repository settings as follows is usually sufficient:
- Navigate to Settings > Code and Automation > Actions > General > Workflow Permissions
- Check “Allow GitHub Actions to create and approve pull requests”
However, automated updating of workflow files requires additional permissions, so the following steps are necessary instead:
-
Create a Fine-Grained Personal Access Token (or similar)
- Navigate to Profile Icon > Settings > Developer Settings (at the bottom) > Personal Access Tokens > Fine-Grained Tokens
-
Click the “Generate New Token” button
-
Give the token a name and (optionally) a description
-
Specify a token expiration date
-
At a minimum, select “only” the repositories created from this template repository
-
Define token permissions as follows:
Permission Type Permission Level Metadata Read Contents Read & Write Pull Requests Read & Write Workflows Read & Write -
Click the “Generate Token” button when ready
-
Capture a copy of the token that has been generated
-
Create a “Secret” that can be used to reference this token
- In the child repository generated from the template, nativate to Settings > Secrets & Variables > Actions > Repository Secrets
-
Click the “New Repository Secret” button
-
Define the Secret Name as “CYGPORT_TEMPLATE_SYNC_TOKEN” (without the quotes)
-
Paste the token generated earlier into the “Secret” field
-
Click the “Add Secret” button
-
To verify, manually run the “Template Synchronizer” workflow. It should automatically detect the existence of the CYGPORT_TEMPLATE_SYNC_TOKEN and then check the parent template for updates.
For troubleshooting information, you may also refer to this link.
Refer to the following for example usage of this template: