-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Workflows #232
base: main
Are you sure you want to change the base?
Update Workflows #232
Conversation
Realized I forgot to mention it in the main PR message. This currently also includes some cleanup effort. I've removed a lot of the LICENSE files except from the root of the project and from each of the tools. I also removed old workflows, unused files, etc. |
Update: I removed the dependency of having a separate PAT. GITHUB_TOKEN has permission configurations available. |
After doing some more testing I re-realized why I did the PAT method over continuing with the GITHUB_TOKEN. The reason is that with using GITHUB_TOKEN, it will not trigger workflows (i.e. the zig-master build workflow). Here is the section in the documentation about it. https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/triggering-a-workflow#triggering-a-workflow-from-a-workflow Here is the specific paragraph that is relavent to enabling this ability:
|
Zon version overriding added. This can be removed if desired, however, based on my idea on what the publish should do, everything in the repo should be versioned together. As such, the publish workflow will now overwrite the version specified in all of the zon files with the tag that is provided. Notes: This overwrite will only occur if the version is a semver or a semver prefixed by v. |
d14a6a7
to
2c49d73
Compare
Update: Features added:
Microzig repository variables/secrets needed:
|
I additionally added some of the commits from #229 to enable the website to build so I could validate that it worked. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, can we cretae something like a "config file" where all variables for the workflows will be defined, and we can make the secret deduplication there?
Wouldn't that be insecure? Storing private keys in a text file doesn't seem wise. Though, if we made the content of the text file the value of the secret we could do that. |
This wasn't meant as a physical file but more as a "github ci file" which can be included or similar, so we don't have to spread the actual secrets across all files. But in the end, it would also just increase complexity for little benefit |
We could turn it into a job/workflow that job would then have outputs which could be used by subsequent jobs. However, we run into the same issue of storing information that should be secret within an actual file that is publicly viewable. |
Updated it with a simplified CI.
Current list of required repository/org secrets should match the old list with a couple additions:
Current list of required repository/org variables:
|
In preparation for ci, cleaned up the website project to remove old ci and uneededd files
Additionally adds the base reusable workflows for publishing (though they are untested)
Also did some file renaming to make things more consitant
Additionally moved the PR creation to its own job docs: added comments to all of the workflows style: formatting updates
This setup makes it so that the CI will override the version specified in the zon file based on the tag that is provided.
Ability to publish both microzig and the website based on a tag/push. The microzig boxzer artifact output is also restructured to be flatter.
Additionally adds the base reusable workflows for publishing (though they are untested)
Idk how this file keeps getting back in here. So now it is gone... again...
This is to help reduce the complexity of the workflows by removing a point of maintenance and potential confusion when trying to figure out why somethings ran but others did not.
(Edit: A lot of this has gotten cut out of the plan. See comments later on about what got removed)
Ello, here is a done pipeline for the main zig tooling/library. It still needs the website stuff (will be working on that next).
How things work and names and everything can be changed. I just wanted to get this out here for people to start looking at.
Implemented functionality:
zig-master
with the changes.zig-master
(d)zig-master
CI Update TODO:
Microzig Repo TODO:
zig-master
branchPR_CREATE_PATPR_CREATE_TOKEN (name changed to be more accurate to what it is. see) secret for actions. This is to allow automated PR creation. The Fine-grained PAT tested with has: "Read access to metadata", and "Read and Write access to pull requests" as permissions for my fork of the microzig repository.Remarks
master-patch/{sha}
. Example: master-patch/1895868a2cf6783cd9be4653b0f99503d4c36f03. This was chosen because it prevents duplication of branch names allowing multiple patches to be open at any given time.ZEG Github Action <>
chore: commit for zig master build ci
master-patch/*
branch tozig-master
with the below details. See (b) for the main con.Testing commit {sha} with zig master
Created by Github action