-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
107 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Testing Action | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
Testing: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Using the testing action | ||
uses: ./testing_action | ||
id: action | ||
|
||
- name: Show message | ||
run: echo ${{ steps.action.outputs.message }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Ignore all files and folders that start with a dot. | ||
.* | ||
|
||
# Ignore all virtual envs' | ||
venv/ | ||
|
||
# Ignore all Python bytecode files. | ||
__pycache__/ | ||
|
||
# Ignore all temporary files. | ||
*.tmp | ||
*.swp | ||
|
||
# Ignore all build artifacts. | ||
build/ | ||
dist/ | ||
|
||
# Ignore all pyaction-related files. | ||
README.md | ||
CONTRIBUTING.md | ||
CHANGELOG.md | ||
LICENSE | ||
Dockerfile | ||
Makefile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# setting the base-image | ||
FROM python:3-slim | ||
|
||
# importing the action | ||
COPY . /action | ||
|
||
# running the script.sh | ||
RUN [ -f /action/script.sh ] && sh /action/script.sh || true | ||
|
||
# installing the requirements | ||
RUN pip install -U pip -r /action/requirements.txt | ||
|
||
# running the main.py file | ||
CMD [ "python", "/action/main.py" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This action gets triggered when a push happens to `pyaction@main`. The aim of this action is to ensure that PyAction is safely usable in practice. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Testing Action | ||
description: Example testing PyAction action | ||
author: Sadra Yahyapour | ||
|
||
branding: | ||
icon: check | ||
color: blue | ||
|
||
runs: | ||
using: docker | ||
image: Dockerfile | ||
|
||
inputs: | ||
github_token: | ||
description: The GitHub auth token | ||
default: ${{ github.token }} | ||
required: true | ||
|
||
repository: | ||
description: The repository name in the form of "<owner>/<repo>" | ||
default: ${{ github.repository }} | ||
required: true | ||
|
||
test_name: | ||
description: Testing name | ||
required: true | ||
|
||
test_age: | ||
description: Testing age | ||
required: true | ||
|
||
outputs: | ||
message: | ||
description: Testing message |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from pyaction import PyAction | ||
|
||
workflow = PyAction() | ||
|
||
|
||
@workflow.action() | ||
def testing_action(sample_name: str, sample_age: int) -> None: | ||
workflow.write( | ||
{ | ||
"message": f"{sample_name=} | {sample_age=}", | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pyaction @ git+https://github.com/lnxpy/pyaction@main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
apt update | ||
apt install -y git |