This repository is a template implementing all actions for the GitHub Projects The Cookie Factory
If the Project mentioned above is the frontend, this is the backend where all the baking magic happens.
Once a new issue is created or its title updated this workflow is here to fetch:
- The recipe instructions
- The list of ingredients
- A picture of the cookie to bake
The GitHub Project built-in automation is set to add an entry when a new issue or pull request is added to this repository. Also it is going to set (default) values for fields in the GitHub Project with the help the titoportas/update-project-fields Actions via GitHub GraphQL API.
The workflow needs the following Actions secrets to operate properly:
FOOD_RECIPES_KEY
which contains the API towards the Food recipes with images endpoint key.PROJECT_KEY
which contains a GitHub Personal Access Token (classic) grantingproject
,read:org
andrepo
access to automatically modify issues and projects within the repo
Additionaly these Actions variables are needed:
PROJECT_ID
is the GraphQL project id which can be viewed with the GH CLI commandgh project list
. This ID looks likePVT_XXXXXXXXXXXXXXXX
PROJECT_URL
is the project URL to update (e.ghttps://github.com/orgs/<org-name>/projects/<project-number>
orhttps://github.com/users/<username/projects/<project-number>
)
Once an issue of this repo gets the issue label Baking
, it will start the baking process which will be reflected live in the Progress
field updated by the titoportas/update-project-fields Actions.
In the end, the issue will be automatically closed by the Actions peter-evans/close-issue which will change the issue status to Done
.
The workflow needs the following Actions secrets to operate properly:
FOOD_RECIPES_KEY
which contains the API towards the Food recipes with images endpoint key.PROJECT_KEY
which contains a GitHub Personal Access Token (classic) grantingproject
,read:org
andrepo
access to automatically modify issues and projects within the repo
Additionaly these Actions variables are needed:
PROJECT_ID
is the GraphQL project id which can be viewed with the GH CLI commandgh project list
. This ID looks likePVT_XXXXXXXXXXXXXXXX
PROJECT_URL
is the project URL to update (e.ghttps://github.com/orgs/<org-name>/projects/<project-number>
orhttps://github.com/users/<username/projects/<project-number>
)
Happy baking! 🍪 🏭