Update README and CODEOWNERS
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
# Repository CODEOWNERS
|
||||||
|
|
||||||
|
* @actions/actions-runtime
|
||||||
|
* @ncalteen
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2019 GitHub Actions
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2018 GitHub, Inc. and contributors
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -9,13 +10,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|||||||
copies of the Software, and to permit persons to whom the Software is
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
furnished to do so, subject to the following conditions:
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
The above copyright notice and this permission notice shall be included in
|
||||||
copies or substantial portions of the Software.
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
SOFTWARE.
|
THE SOFTWARE.
|
||||||
|
|||||||
@@ -1,23 +1,95 @@
|
|||||||
# Hello world docker action
|
# Hello, World! Docker Action
|
||||||
|
|
||||||
This action prints "Hello World" to the log or "Hello" + the name of a person to greet. To learn how this action was built, see "[Creating a Docker container action](https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action)" in the GitHub Docs.
|
[](https://github.com/super-linter/super-linter)
|
||||||
|

|
||||||
|
|
||||||
|
This action prints `Hello, World!` or `Hello, <who-to-greet>!` to the log. To
|
||||||
|
learn how this action was built, see
|
||||||
|
[Creating a Docker container action](https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action).
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Here's an example of how to use this action in a workflow file:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
name: Example Workflow
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
who-to-greet:
|
||||||
|
description: Who to greet in the log
|
||||||
|
required: true
|
||||||
|
default: 'World'
|
||||||
|
type: string
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
say-hello:
|
||||||
|
name: Say Hello
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
# Change @main to a specific commit SHA or version tag, e.g.:
|
||||||
|
# actions/hello-world-docker-action@e76147da8e5c81eaf017dede5645551d4b94427b
|
||||||
|
# actions/[email protected]
|
||||||
|
- name: Print to Log
|
||||||
|
id: print-to-log
|
||||||
|
uses: actions/hello-world-docker-action@main
|
||||||
|
with:
|
||||||
|
who-to-greet: ${{ inputs.who-to-greet }}
|
||||||
|
```
|
||||||
|
|
||||||
|
For example workflow runs, check out the
|
||||||
|
[Actions tab](https://github.com/actions/hello-world-docker-action/actions)!
|
||||||
|
:rocket:
|
||||||
|
|
||||||
## Inputs
|
## Inputs
|
||||||
|
|
||||||
### `who-to-greet`
|
| Input | Default | Description |
|
||||||
|
| -------------- | ------- | ------------------------------- |
|
||||||
**Required** The name of the person to greet. Default `"World"`.
|
| `who-to-greet` | `World` | The name of the person to greet |
|
||||||
|
|
||||||
## Outputs
|
## Outputs
|
||||||
|
|
||||||
### `time`
|
| Output | Description |
|
||||||
|
| ------ | ----------------------- |
|
||||||
|
| `time` | The time we greeted you |
|
||||||
|
|
||||||
The time we greeted you.
|
## Test Locally
|
||||||
|
|
||||||
## Example usage
|
After you've cloned the repository to your local machine or codespace, you'll
|
||||||
|
need to perform some initial setup steps before you can test your action.
|
||||||
|
|
||||||
```yaml
|
> [!NOTE]
|
||||||
uses: actions/hello-world-docker-action@main
|
>
|
||||||
with:
|
> You'll need to have a reasonably modern version of
|
||||||
who-to-greet: 'Mona the Octocat'
|
> [Docker](https://www.docker.com/get-started/) handy (e.g. docker engine
|
||||||
```
|
> version 20 or later).
|
||||||
|
|
||||||
|
1. :hammer_and_wrench: Build the container
|
||||||
|
|
||||||
|
Make sure to replace `actions/hello-world-docker-action` with an appropriate
|
||||||
|
label for your container.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker build -t actions/hello-world-docker-action .
|
||||||
|
```
|
||||||
|
|
||||||
|
1. :white_check_mark: Test the container
|
||||||
|
|
||||||
|
You can pass individual environment variables using the `--env` or `-e` flag.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ docker run --env INPUT_WHO_TO_GREET="Mona Lisa Octocat" actions/hello-world-docker-action
|
||||||
|
::notice file=entrypoint.sh,line=7::Hello, Mona Lisa Octocat!
|
||||||
|
```
|
||||||
|
|
||||||
|
Or you can pass a file with environment variables using `--env-file`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ cat ./.env.test
|
||||||
|
INPUT_WHO_TO_GREET="Mona Lisa Octocat"
|
||||||
|
|
||||||
|
$ docker run --env-file ./.env.test actions/hello-world-docker-action
|
||||||
|
::notice file=entrypoint.sh,line=7::Hello, Mona Lisa Octocat!
|
||||||
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user