Skip to content

Add GitHub Actions workflow to build and deploy plugin to OMCSI#141

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/add-github-actions-workflow
Draft

Add GitHub Actions workflow to build and deploy plugin to OMCSI#141
Copilot wants to merge 3 commits intomainfrom
copilot/add-github-actions-workflow

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 7, 2026

Adds a CI/CD workflow that builds the plugin JAR and deploys it to an omcsi instance, modeled after the Activity Tracker deploy workflow.

  • Triggers: Push to DEPLOY_BRANCH (default: main) + manual workflow_dispatch
  • Build: JDK 8 (temurin), installs Ponder from dependencies/ dir, then mvn --batch-mode clean package
  • JAR resolution: Finds shaded JAR in target/, excludes original-*/*-sources.jar/*-javadoc.jar
  • Deploy: POSTs JAR to OMCSI_DEPLOY_URL/api/plugins/deploy with bearer auth
  • Error handling: Distinct messages for missing variables, 401 auth failures, 400 bad requests, network errors

The only deviation from the reference workflow is an additional step to mvn install:install-file the Ponder dependency, which isn't available from any public Maven repository.

Required repo configuration

Secrets
OMCSI_DEPLOY_URL Base URL of the omcsi instance
OMCSI_DEPLOY_TOKEN DEPLOY_AUTH_TOKEN from omcsi .env
Variables
PLUGIN_JAR_NAME Target filename on server, e.g. SimpleSkills.jar
DEPLOY_BRANCH Branch that triggers deploys (optional, default: main)
Original prompt

This section details on the original issue you should resolve

<issue_title>Add GitHub Actions workflow to build and deploy plugin to OMCSI</issue_title>
<issue_description>## Summary

Add a .github/workflows/deploy.yml file that automatically builds the plugin JAR and deploys it to the omcsi (open-mc-server-infrastructure) instance when changes are pushed to the deploy branch.

Implementation

Create .github/workflows/deploy.yml modeled after the Activity Tracker reference workflow with the following adjustments for this project:

  • JDK version: [8 / 11 / 17 / 21]
  • Build tool & command:
    • Maven: mvn --batch-mode package
    • Gradle: ./gradlew build
  • JAR location:
    • Maven: target/ (exclude original-*, *-sources.jar, *-javadoc.jar)
    • Gradle: build/libs/ (exclude *-sources.jar, *-javadoc.jar)

Required Secrets

Add via repo Settings → Secrets and variables → Actions:

Secret Value
OMCSI_DEPLOY_URL Base URL of the omcsi instance, e.g. https://mc.example.com:8092
OMCSI_DEPLOY_TOKEN Value of DEPLOY_AUTH_TOKEN from the omcsi .env file

Required Variables

Add via repo Settings → Secrets and variables → Actions → Variables:

Variable Value
PLUGIN_JAR_NAME Filename of the JAR on the server, e.g. MyPlugin.jar
DEPLOY_BRANCH Branch that triggers deploys (default: main)

Acceptance Criteria

  • .github/workflows/deploy.yml exists in the repo
  • Pushing to the deploy branch triggers a build and successful deploy
  • Workflow can also be triggered manually via the Actions tab (workflow_dispatch)
  • Failed builds, missing variables, auth errors, and bad requests all produce a clear error message and non-zero exit code
  • Secrets and variables documented in this ticket are configured in the repo

Reference

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: dmccoystephenson <21204351+dmccoystephenson@users.noreply.github.com>
Copilot AI changed the title [WIP] Add GitHub Actions workflow to build and deploy plugin Add GitHub Actions workflow to build and deploy plugin to OMCSI Mar 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add GitHub Actions workflow to build and deploy plugin to OMCSI

2 participants