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.
To create your own action, you can use this repository as a template! Just follow the below instructions:
- Click the Use this template button at the top of the repository
- Select Create a new repository
- Select an owner and name for your new repository
- Click Create repository
- Clone your new repository
Here's an example of how to use this action in a workflow file:
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.:
# yonasBSD/toolkit@e76147da8e5c81eaf017dede5645551d4b94427b
# yonasBSD/toolkit@v1.2.3
- name: Print to Log
id: print-to-log
uses: yonasBSD/toolkit@main
with:
run: |
comtrya --version
just --version
task --version
trufflehog --version
trivy --version
kcl --version
rcl --version
b3sum --version
bash --version
venom version
hurl --version
typst --version
treefmt --version
pipelight --version
minijinja --version
cosign version
cargo-binstall -V
cargo-deny --version
cargo-audit --version
ls /usr/local/bin/cargo-auditable
ls /usr/local/bin/cargo-license
For example workflow runs, check out the Actions tab! :rocket:
Input | Default | Description |
---|---|---|
who-to-greet |
World |
The name of the person to greet |
Output | Description |
---|---|
time |
The time we greeted you |
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.
Note
You'll need to have a reasonably modern version of Docker handy (e.g. docker engine version 20 or later).
-
🛠️ Build the container
Make sure to replace
yonasBSD/toolkit
with an appropriate label for your container.docker build -t yonasBSD/toolkit .
-
✅ Test the container
You can pass individual environment variables using the
--env
or-e
flag.$ docker run --env INPUT_WHO_TO_GREET="Mona Lisa Octocat" yonasBSD/toolkit ::notice file=entrypoint.sh,line=7::Hello, Mona Lisa Octocat!
Or you can pass a file with environment variables using
--env-file
.$ echo "INPUT_WHO_TO_GREET=\"Mona Lisa Octocat\"" > ./.env.test $ docker run --env-file ./.env.testyonasBSD/toolkit ::notice file=entrypoint.sh,line=7::Hello, Mona Lisa Octocat!