Skip to content

Commit

Permalink
My first action is ready
Browse files Browse the repository at this point in the history
  • Loading branch information
tfemby committed Jan 29, 2024
1 parent 57e9281 commit 8222b27
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Name the portage image
FROM gentoo/portage:latest as portage

# Based on the stage3 image
FROM gentoo/stage3:latest

# Copy the entire porage volume in
COPY --from=portage /var/db/repos/gentoo /var/db/repos/gentoo

# Emerge pycargoebuild
RUN emerge -qv app-portage/pycargoebuild

# Set the working directory inside the container
WORKDIR /usr/src

# Copy any source file(s) required for the action
COPY entrypoint.sh .

# Configure the container to be run as an executable
ENTRYPOINT ["/usr/src/entrypoint.sh"]
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,24 @@
# testing

# 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'

20 changes: 20 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: 'Hello World'
description: 'Greet someone and record the time'

# Define your inputs here.
inputs:
who-to-greet:
description: 'Who to greet'
required: true
default: 'World'

# Define your outputs here.
outputs:
time:
description: 'The time we greeted you'

runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.who-to-greet }}
5 changes: 5 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash -l

echo "Hello $1"
time=$(date)
echo "time=$time" >> $GITHUB_OUTPUT

0 comments on commit 8222b27

Please sign in to comment.