My first action is ready

This commit is contained in:
david committed 2024-07-27 13:19:57 +02:00
commit 95c7628628
4 files changed
+50

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
# Container image that runs your code
FROM alpine:3.20
# Copies your code file from your action repository to the filesystem path `/` of the container
COPY --chmod=555 entrypoint.sh /entrypoint.sh
# Code file to execute when the docker container starts up (`entrypoint.sh`)
ENTRYPOINT ["/entrypoint.sh"]
+21
View File
@@ -0,0 +1,21 @@
# Hello world docker action
This action prints "Hello World" or "Hello" + the name of a person to greet to the log.
## Inputs
## `who-to-greet`
**Required** The name of the person to greet. Default `"World"`.
## Outputs
## `time`
The time we greeted you.
## Example usage
uses: actions/hello-world-docker-action@v2
with:
who-to-greet: 'Mona the Octocat'
+16
View File
@@ -0,0 +1,16 @@
# action.yml
name: 'Hello World'
description: 'Greet someone and record the time'
inputs:
who-to-greet: # id of input
description: 'Who to greet'
required: true
default: 'World'
outputs:
time: # id of output
description: 'The time we greeted you'
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.who-to-greet }}
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh -l
echo "Hello $1"
time=$(date)
echo "time=$time" >> $GITHUB_OUTPUT