-
Notifications
You must be signed in to change notification settings - Fork 361
Migrate workflow to GitHub Actions #1105
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
Conversation
|
@Sergio0694 this should be what you need, you have different conditions a bit than we do for when things trigger (we only trigger on specific branches for instance). But otherwise I think this is all setup for you. I don't think it'll run until it's merged though. This logic does the following:
This is the same setup we have for WCT. @Arlodotexe feel free to take a quick look in case I missed something (as we have matrix vs. single bits). |
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.
Some actions here already have newer published versions.
I furthermore reviewed the whole workflow, but not in a dotnet usage point of view, but in a GitHub Actions workflow usage point of view. I have a couple of suggestions, even before using any kind of linter.
| steps: | ||
| - name: Git checkout | ||
| uses: actions/checkout@v4 | ||
|
|
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.
| with: | |
| persist-credentials: false | |
Since no git push operations are performed, it is a good practice to not have the credentials kept in the git config.
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.
Good points, we should look into all these in a follow up. Same for the other comments below 🙂
| path: ./packages | ||
|
|
||
| - name: Install Signing Tool | ||
| run: dotnet tool install --tool-path ./tools sign --version 0.9.1-beta.25379.1 |
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.
Plan a way to keep this tool's version updated. Having it hardcoded to a specific version, beta on top of that, is a little smelly.
In repos that use renovate (not the case here), I would've have seen an env var with that version, and the env var definition having a comment linking back to the source of the project, so updates could be done.
|
|
||
| jobs: |
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.
[nit] Potential improvement: define a global permission key with the common base permissions for all jobs explicitly, or clear the default permissions with {}. Then, in each job, explicitly list the permissions needed and wanted.
This helps when changing the workflow later on, like adding a job, to not have too much permissions.
Also, combine this with a review of the repo's GitHub Actions settings. Some older existing repos have more permissive defaults than newer repos/forks, and these will not limit as much the default permissions to read for contents and packages (usually enough as a default). The change happened a couple years ago
Co-authored-by: Edouard Choinière <27212526+echoix@users.noreply.github.com>
Standardized job and step names in the CI workflow for clarity and consistency. Updated .NET SDK installation to use global.json instead of a hardcoded version. Improved comments and formatting for better maintainability.
This PR moves the workflow for the build pipeline from Azure DevOps to GitHub Actions.