Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Implement new action 'quick-task' for task execution #11

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions quick-task/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Quick-Task Action

The `quick-task` action is designed to enhance your workflow by allowing you to define a task description within your action configuration. When triggered, the action can automatically execute the task as specified.

## Workflow Ideas

- **Automate Tasks** Use the action to run predefined tasks quickly and efficiently.
- **Custom Scripts** Execute custom scripts based on the task description provided.

## Usage

To use the `quick-task` action in your project, you'll need to include it in your GitHub workflow files. Define the task you wish to automate and configure the action to execute it.

### Inputs

- `task-description`: (Required) The description of the task to run.

### Example Workflow

```yaml
name: Run Quick Task

on:
workflow_dispatch:

jobs:
quick-task:
runs-on: ubuntu-latest
steps:
- name: Execute Task
uses: PR-Pilot-AI/smart-actions/quick-task@v1
with:
# Description of the task to run
task-description: "Automate build process"
```
17 changes: 17 additions & 0 deletions quick-task/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: "Quick-Task"
description: "Runs a specified task based on the task description provided."

inputs:
task-description:
description: "The description of the task to run."
required: true

runs:
using: "composite"
steps:
- name: Execute Task
shell: bash
run: |
# Custom script to execute the task
echo "Running task: ${{ inputs.task-description }}"
# Placeholder for task execution script
14 changes: 14 additions & 0 deletions quick-task/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

# Placeholder for the script to execute the task based on the task description

echo "Executing task: $1"

# Example: If task description is "build", run a build script
# This is a simplified example. Actual implementation will depend on the task description.
if [ "$1" == "build" ]; then
echo "Running build script..."
# Placeholder for build script execution
else
echo "Task description not recognized."
fi
Loading