Skip to content

Transition deployment to Linux-based service#117

Merged
StuartFerguson merged 1 commit intomainfrom
task/#116_linux_release_workflow
Jul 4, 2025
Merged

Transition deployment to Linux-based service#117
StuartFerguson merged 1 commit intomainfrom
task/#116_linux_release_workflow

Conversation

@StuartFerguson
Copy link
Copy Markdown
Member

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.

closes #116

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 thread .github/workflows/createrelease.yml Outdated
Comment on lines 147 to 223

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

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:

  1. Use contents: read for jobs that only require access to repository content.
  2. Add specific write permissions (e.g., issues: write, pull-requests: write) only if required by specific actions.
  3. Apply the permissions block 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

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/createrelease.yml b/.github/workflows/createrelease.yml
--- a/.github/workflows/createrelease.yml
+++ b/.github/workflows/createrelease.yml
@@ -4,6 +4,9 @@
   release:
     types: [published]
 
+permissions:
+  contents: read
+
 jobs:
   buildlinux:
     name: "Release"
EOF
@@ -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.
@StuartFerguson StuartFerguson merged commit f4c2a50 into main Jul 4, 2025
12 checks passed
@github-actions github-actions Bot deleted the task/#116_linux_release_workflow branch September 3, 2025 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create Linux Install workflow

2 participants