Transition deployment to Linux-based service#117
Merged
StuartFerguson merged 1 commit intomainfrom Jul 4, 2025
Merged
Conversation
Updated `createrelease.yml` to shift from a Windows-based service to a Linux-based service. Key changes include: - Targeting `linux-x64` in the `dotnet publish` command. - Replacing Windows service management with `systemctl` commands. - Adding a step to install the .NET runtime on the Linux server. - Creating a systemd service file for application management. - Implementing commands to stop, disable, and remove existing services before deploying the new version for a clean deployment process.
Comment on lines
147
to
223
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 10 months ago
To address this issue, we need to add an explicit permissions block to the workflow file. The permissions should be set to the least privileges needed for the actions performed in the workflow. For example:
- Use
contents: readfor jobs that only require access to repository content. - Add specific write permissions (e.g.,
issues: write,pull-requests: write) only if required by specific actions. - Apply the
permissionsblock at the workflow level to cover all jobs, or to individual jobs if different permission levels are needed.
For this workflow, a reasonable starting point is contents: read, as the jobs primarily involve downloading and uploading artifacts and installing software on servers.
Suggested changeset
1
.github/workflows/createrelease.yml
| @@ -4,6 +4,9 @@ | ||
| release: | ||
| types: [published] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| buildlinux: | ||
| name: "Release" |
Copilot is powered by AI and may make mistakes. Always verify output.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updated
createrelease.ymlto shift from a Windows-based service to a Linux-based service. Key changes include:linux-x64in thedotnet publishcommand.systemctlcommands.closes #116