Skip to content

Commit

Permalink
Merge pull request #9 from ps-actions-sandbox/createAction
Browse files Browse the repository at this point in the history
Create action
  • Loading branch information
housten authored Jun 12, 2024
2 parents 80b432f + fa0693e commit 13efc81
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/runContainerAction.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: CI build for container action

on:
workflow_dispatch:

jobs:
container-run:
runs-on: unbuntu-latest
steps:
- name: checkout
uses: actions/checkout@4
- name: run my container action
uses: ./DockerAction
with:
who-to-greet: everyone
7 changes: 7 additions & 0 deletions DockerAction/DockerFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM alpine:3.10

COPY entrypoint.sh /entrypoint.sh

RUN chmod +x entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
13 changes: 13 additions & 0 deletions DockerAction/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: 'Docker Action'
inputs:
who-to-greet:
description: who's there?
default: attendees
outputs:
time:
description: 'when it happened'
runs:
using: docker
image: DockerFile
args:
- ${{ inputs.who-to-greet }}
3 changes: 3 additions & 0 deletions DockerAction/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
echo "hello $1"

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

0 comments on commit 13efc81

Please sign in to comment.