Skip to content

Commit 60fd4e1

Browse files
Merge pull request #61 from christianncode/feature/UpdateActionsDirectory
update actions directory
2 parents 35596ed + 881171c commit 60fd4e1

5 files changed

Lines changed: 57 additions & 1 deletion

File tree

File renamed without changes.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: "Setup MyCLI"
2+
description: "Installs MyCLI and adds it to the PATH"
3+
author: "Christianncode"
4+
5+
inputs:
6+
version:
7+
description: "The CLI version to install"
8+
required: false
9+
default: "latest"
10+
runs:
11+
using: "node16"
12+
main: "index.js"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const core = require("@actions/core");
2+
const {execSync} = require("child_process");
3+
4+
async function run() {
5+
try {
6+
const version = core.getInput("version") || "latest";
7+
8+
console.log(`Installing MyCLI version: ${version}...`);
9+
10+
execSync(`curl -fsSL https://cli.example.com/install.sh | sh`, {
11+
stdio: "inherit",
12+
});
13+
14+
console.log("MyCLI installed successfully.");
15+
} catch (error) {
16+
core.setFailed(`Installation failed: ${error.message}`);
17+
}
18+
}
19+
20+
run();

.github/workflows/test-cli.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Test MyCLI Setup
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- feature/*
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Install MyCLI
17+
uses: ./.github/actions/my-cli-action
18+
with:
19+
version: "1.2.3"
20+
21+
- name: Verify CLI Installation
22+
run: |
23+
echo "Checking MyCLI version..."
24+
mycli --version

.github/workflows/workflow-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
uses: actions/checkout@v4
1616

1717
- name: Call Greeting Workflow
18-
uses: ./.github/workflows/utilities/composite-workflow
18+
uses: ./.github/actions/composite-workflow
1919
with:
2020
name: "Environment: ${{ vars.ENVIRONMENT_NAME }}"
2121
message: "Hola"

0 commit comments

Comments
 (0)