https://github.com/axel-op/hello-world-dart-github-action
A template to demonstrate how to build a Dart GitHub Action.
https://github.com/axel-op/hello-world-dart-github-action
dart dartlang github-action github-action-javascript github-actions github-actions-javascript
Last synced: about 1 month ago
JSON representation
A template to demonstrate how to build a Dart GitHub Action.
- Host: GitHub
- URL: https://github.com/axel-op/hello-world-dart-github-action
- Owner: axel-op
- License: mit
- Created: 2020-05-11T05:17:23.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-08-18T19:26:50.000Z (over 2 years ago)
- Last Synced: 2025-03-17T17:49:18.487Z (about 1 month ago)
- Topics: dart, dartlang, github-action, github-action-javascript, github-actions, github-actions-javascript
- Language: Dart
- Homepage:
- Size: 386 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hello world Dart action
> [See here](https://gist.github.com/axel-op/deff66ac2f28a01813193d90de36c564) for a comparison of the different ways to build a GitHub Action with Dart.
A "Hello World" GitHub Action coded in Dart.
This action prints "Hello World" or "Hello" + the name of a person to greet to the log.
The Dart application is located in the [`app`](./app) directory. To use this template, just edit the files inside this directory as you would with any Dart program, and it will work without modifiying any other file.
This action requires the workflow to set up a Dart container before its execution (see the example below). [See here](https://github.com/axel-op/self-contained-dart-action) to build an action with Dart that doesn't need a Dart container to run.
## Inputs
### `who-to-greet`
**Required** The name of the person to greet. Default `"World"`.
## Outputs
### `time`
The time we greeted you.
## Example usage
```yaml
jobs:
example:
runs-on: ubuntu-latestcontainer: google/dart:2 # Required to run the action
steps:
- uses: axel-op/hello-world-dart-action@master
id: dart-action
with:
who-to-greet: "Mona the Octocat"
- run: echo 'The time was ${{ steps.dart-action.outputs.time }}'
```