Skip to content

Commit 2c2d400

Browse files
committed
test
1 parent 2a0de80 commit 2c2d400

File tree

3 files changed

+60
-1
lines changed

3 files changed

+60
-1
lines changed

README.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,32 @@
1-
# action-test-publish
1+
# Action Test Publish
2+
3+
This repository contains two GitHub Actions for testing:
4+
5+
## 1. Echo Action
6+
7+
A simple action that echoes a message.
8+
9+
**Location**: `echo-action/`
10+
11+
**Usage**:
12+
```yaml
13+
uses: your-username/action-test-publish/echo-action@main
14+
with:
15+
message: "Your message here" # Optional, defaults to "Hello from GitHub Action!"
16+
```
17+
18+
## 2. File Processor Action
19+
20+
An action that processes files with basic operations.
21+
22+
**Location**: `file-processor-action/`
23+
24+
**Usage**:
25+
```yaml
26+
uses: your-username/action-test-publish/file-processor-action@main
27+
with:
28+
file_path: "path/to/file" # Optional, defaults to "README.md"
29+
operation: "count" # Optional: "count" or "print", defaults to "count"
30+
```
31+
32+
Each action is located in its own directory and can be referenced independently in GitHub workflows.
File renamed without changes.

file-processor-action/action.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: 'File Processor'
2+
description: 'A simple action that processes files'
3+
branding:
4+
icon: 'file-text'
5+
color: 'green'
6+
inputs:
7+
file_path:
8+
description: 'Path to file to process'
9+
required: false
10+
default: 'README.md'
11+
operation:
12+
description: 'Operation to perform (count, print)'
13+
required: false
14+
default: 'count'
15+
runs:
16+
using: 'composite'
17+
steps:
18+
- name: Process file
19+
run: |
20+
if [ "${{ inputs.operation }}" = "count" ]; then
21+
wc -l "${{ inputs.file_path }}"
22+
elif [ "${{ inputs.operation }}" = "print" ]; then
23+
cat "${{ inputs.file_path }}"
24+
else
25+
echo "Unknown operation: ${{ inputs.operation }}"
26+
exit 1
27+
fi
28+
shell: bash

0 commit comments

Comments
 (0)