-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 2c50abf
Showing
6 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- uses: ./ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM alpine | ||
RUN apk add --no-cache bash | ||
COPY entrypoint.sh / | ||
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 WaterLemons2k | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
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 | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Bash Action - **Docker** | ||
|
||
A Bash Action template using **Docker** that outputs `Hello World` or `Hello` + name to the log by default. | ||
|
||
This template includes [test](.github/workflows/test.yml). | ||
|
||
## Usage | ||
|
||
Click the `Use this template` -> `Create a new repository` for your Action. | ||
|
||
## Update `action.yml` | ||
|
||
Update your Action's [`action.yml`](action.yml) with your `name`, `description`, `inputs` and `outputs`. | ||
|
||
## Compare | ||
|
||
Compare with other Bash Action templates: | ||
|
||
| Using | Advantage | Disadvantage | Recommend to | | ||
| ----------- | -------------------------- | ----------------------------------- | ---------------------------------------------- | | ||
| docker | Container can be used. | Need to build the image every time. | Bash that only can be run in container. | | ||
| [node] | Node.js can be used. | Need to run Bash via Node.js. | Just run Bash. | | ||
| [composite] | Other Actions can be used. | Need to mapped inputs via env. | Bash needs other Actions or doesn't want node. | | ||
|
||
[node]:https://github.com/actions-bash/node | ||
[composite]:https://github.com/actions-bash/composite | ||
|
||
## See also | ||
|
||
- [Creating a Docker container action - GitHub Docs](https://docs.github.com/actions/creating-actions/creating-a-docker-container-action) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: 'Bash Action - Docker container' | ||
description: 'A Bash Action template using Docker.' | ||
|
||
inputs: | ||
name: | ||
description: 'Name of thing' | ||
required: false | ||
default: 'World' | ||
|
||
outputs: | ||
time: | ||
description: 'Current time' | ||
|
||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
echo "Hello $INPUT_NAME" | ||
echo "time=$(date)" >> $GITHUB_OUTPUT |