Skip to content

Shared setup action#1

Merged
mmathieum merged 1 commit into
masterfrom
mm/action_setup
Apr 14, 2026
Merged

Shared setup action#1
mmathieum merged 1 commit into
masterfrom
mm/action_setup

Conversation

@mmathieum

Copy link
Copy Markdown
Member

No description provided.

@mmathieum mmathieum self-assigned this Apr 14, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new GitHub composite action for workspace setup and configures Dependabot to track GitHub Actions updates. The setup action manages submodule checkouts, environment variable configuration, apt dependency installation, and JDK/Gradle setup. Feedback focuses on improving the action's modularity by replacing hardcoded repository names and environment variables with inputs, resolving a TODO regarding outputs, and enhancing shell script robustness through proper quoting and more flexible path handling.

Comment thread .github/actions/setup/action.yml
Comment thread .github/actions/setup/action.yml
Comment thread .github/actions/setup/action.yml
Comment thread .github/actions/setup/action.yml
Comment thread .github/actions/setup/action.yml
Comment thread .github/actions/setup/action.yml
Comment thread .github/actions/setup/action.yml
mmathieum added a commit to mtransitapps/ca-halifax-transit-ferry-android that referenced this pull request Apr 14, 2026
@mmathieum mmathieum marked this pull request as ready for review April 14, 2026 19:43
@mmathieum mmathieum requested a review from Copilot April 14, 2026 19:43
@mmathieum mmathieum merged commit ff98d26 into master Apr 14, 2026
5 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces shared GitHub automation configuration by adding a composite “setup” action under .github/actions/ and enabling Dependabot updates for GitHub Actions.

Changes:

  • Add a Dependabot configuration to keep GitHub Actions dependencies up to date (including grouping).
  • Add a new composite action (.github/actions/setup) intended to centralize repository setup steps (submodules, env setup, apt deps, Java/Gradle).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
.github/dependabot.yml Adds Dependabot configuration for GitHub Actions updates.
.github/actions/setup/action.yml Adds a composite setup action with git/submodule, env, apt, Java, and Gradle setup steps.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


- name: MT check out submodules
shell: bash
run: ./checkout_submodules.sh

Copilot AI Apr 14, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The composite action calls ./checkout_submodules.sh, but that script does not exist anywhere in this repository. As-is, any workflow using this action in this repo will fail at runtime. Either add the script to the repo (and ensure it’s executable) or change the action to reference a script that is shipped with the action itself (e.g., via ${{ github.action_path }}).

Suggested change
run: ./checkout_submodules.sh
run: |
echo "[MT] > Syncing and checking out git submodules..."
git submodule sync --recursive
git submodule update --init --recursive

Copilot uses AI. Check for mistakes.
Comment on lines +78 to +82
run: ./commons/code_sync.sh

- name: MT code setup
shell: bash
run: ./commons/code_setup.sh

Copilot AI Apr 14, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

./commons/code_sync.sh and ./commons/code_setup.sh are referenced here, but there is no commons/ directory (or these scripts) in this repository. This will cause the action to fail when run from this repo unless those scripts are added or the action is designed to run against a different checked-out repository and uses explicit paths (e.g., ${{ github.workspace }} vs ${{ github.action_path }}).

Suggested change
run: ./commons/code_sync.sh
- name: MT code setup
shell: bash
run: ./commons/code_setup.sh
run: |
SCRIPT="${{ github.workspace }}/commons/code_sync.sh"
if [ ! -f "$SCRIPT" ]; then
echo "[MT] > Missing required script: $SCRIPT"
exit 1
fi
bash "$SCRIPT"
- name: MT code setup
shell: bash
run: |
SCRIPT="${{ github.workspace }}/commons/code_setup.sh"
if [ ! -f "$SCRIPT" ]; then
echo "[MT] > Missing required script: $SCRIPT"
exit 1
fi
bash "$SCRIPT"

Copilot uses AI. Check for mistakes.
inputs:
code-sync:
description: "Sync code from submodules before setup."
type: boolean

Copilot AI Apr 14, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type: boolean is not a supported key for action inputs in action.yml (it’s used for workflow_call inputs, not composite actions). This will likely make the action metadata invalid. Remove the type field (and keep default/required), or convert this into a reusable workflow if you need typed inputs.

Suggested change
type: boolean

Copilot uses AI. Check for mistakes.
Comment on lines +4 to +5
code-sync:
description: "Sync code from submodules before setup."

Copilot AI Apr 14, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The input id code-sync contains a hyphen, but it’s later referenced via dot-notation (inputs.code-sync). In GitHub expressions, - is the subtraction operator, so this can be parsed incorrectly. Prefer renaming the input to code_sync (or similar), or reference it with bracket syntax (e.g., inputs['code-sync']).

Copilot uses AI. Check for mistakes.
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.

2 participants