51 Commits
v2 ... main

Author SHA1 Message Date
Nick Alteen
8bcd8e1af3 Merge pull request #40 from actions/dependabot/docker/docker-minor-60be0b6e22
Some checks failed
Continuous Integration / Docker Tests (push) Has been cancelled
Continuous Integration / GitHub Actions Test (push) Has been cancelled
Lint Codebase / Lint Codebase (push) Has been cancelled
Bump alpine from 3.22 to 3.23 in the docker-minor group
2026-02-18 15:59:58 -05:00
dependabot[bot]
8b502d2465 Bump alpine from 3.22 to 3.23 in the docker-minor group
Bumps the docker-minor group with 1 update: alpine.


Updates `alpine` from 3.22 to 3.23

---
updated-dependencies:
- dependency-name: alpine
  dependency-version: '3.23'
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: docker-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-08 11:07:04 +00:00
Nick Alteen
842595aafa Merge pull request #39 from actions/dependabot/github_actions/actions/checkout-6
Bump actions/checkout from 5 to 6
2025-12-05 11:26:30 -05:00
Nick Alteen
2dbe6e60bc Add user 2025-12-05 11:24:37 -05:00
Nick Alteen
ff3b85c57f Disable biome linters 2025-12-05 11:22:49 -05:00
dependabot[bot]
9268cfe5b4 Bump actions/checkout from 5 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-24 11:43:38 +00:00
Nick Alteen
9f96333901 Merge pull request #38 from actions/dependabot/github_actions/actions/checkout-5
Bump actions/checkout from 4 to 5
2025-08-26 14:52:38 -04:00
Nick Alteen
72f033c275 Disable new linter 2025-08-26 14:50:03 -04:00
dependabot[bot]
f0c8dcb3c3 Bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-26 00:55:57 +00:00
Nick Alteen
43190ae20e Merge pull request #37 from actions/dependabot/github_actions/super-linter/super-linter-8
Bump super-linter/super-linter from 7 to 8
2025-08-05 13:05:37 -04:00
dependabot[bot]
6afdcb1a83 Bump super-linter/super-linter from 7 to 8
Bumps [super-linter/super-linter](https://github.com/super-linter/super-linter) from 7 to 8.
- [Release notes](https://github.com/super-linter/super-linter/releases)
- [Changelog](https://github.com/super-linter/super-linter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/super-linter/super-linter/compare/v7...v8)

---
updated-dependencies:
- dependency-name: super-linter/super-linter
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-04 15:10:22 +00:00
Nick Alteen
773f6dbe05 Merge pull request #36 from actions/dependabot/docker/docker-minor-04137663b3
Bump alpine from 3.21 to 3.22 in the docker-minor group
2025-06-06 10:43:36 -04:00
dependabot[bot]
66e612e94e Bump alpine from 3.21 to 3.22 in the docker-minor group
Bumps the docker-minor group with 1 update: alpine.


Updates `alpine` from 3.21 to 3.22

---
updated-dependencies:
- dependency-name: alpine
  dependency-version: '3.22'
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: docker-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-02 12:31:47 +00:00
Nick Alteen
0752cdfccd Merge pull request #35 from actions/dependabot/docker/docker-minor-00e494591e
Bump alpine from 3.20 to 3.21 in the docker-minor group
2024-12-11 11:45:32 -05:00
dependabot[bot]
5fd24927d3 Bump alpine from 3.20 to 3.21 in the docker-minor group
Bumps the docker-minor group with 1 update: alpine.


Updates `alpine` from 3.20 to 3.21

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: docker-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-09 11:25:00 +00:00
Nick Alteen
9f7ce46297 Merge pull request #33 from actions/dependabot/github_actions/super-linter/super-linter-7
Bump super-linter/super-linter from 6 to 7
2024-08-22 11:55:02 -04:00
Nick Alteen
53f8e177e8 Rename checkov file 2024-08-22 11:52:55 -04:00
dependabot[bot]
97c371b22c Bump super-linter/super-linter from 6 to 7
Bumps [super-linter/super-linter](https://github.com/super-linter/super-linter) from 6 to 7.
- [Release notes](https://github.com/super-linter/super-linter/releases)
- [Changelog](https://github.com/super-linter/super-linter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/super-linter/super-linter/compare/v6...v7)

---
updated-dependencies:
- dependency-name: super-linter/super-linter
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-19 11:57:08 +00:00
Nick Alteen
0335a4109c Merge pull request #32 from actions/dependabot/github_actions/docker/build-push-action-6
Bump docker/build-push-action from 5 to 6
2024-06-17 10:48:31 -04:00
dependabot[bot]
d075753879 Bump docker/build-push-action from 5 to 6
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-17 11:26:34 +00:00
Nick Alteen
a4403bff8a Merge pull request #31 from actions/dependabot/docker/docker-minor-45c93d57be
Bump alpine from 3.19 to 3.20 in the docker-minor group
2024-05-29 10:14:04 -04:00
dependabot[bot]
f92f69e492 Bump alpine from 3.19 to 3.20 in the docker-minor group
Bumps the docker-minor group with 1 update: alpine.


Updates `alpine` from 3.19 to 3.20

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: docker-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-27 12:02:35 +00:00
Nick Alteen
84888ed472 Revert output 2024-03-02 21:12:09 -05:00
Nick Alteen
71963a967c Merge pull request #29 from actions/dependabot/github_actions/super-linter/super-linter-6
Bump super-linter/super-linter from 5 to 6
2024-02-22 09:51:41 -05:00
Nick Alteen
e01cee858b Fix linting errors 2024-02-22 09:49:41 -05:00
dependabot[bot]
885a2b4891 Bump super-linter/super-linter from 5 to 6
Bumps [super-linter/super-linter](https://github.com/super-linter/super-linter) from 5 to 6.
- [Release notes](https://github.com/super-linter/super-linter/releases)
- [Changelog](https://github.com/super-linter/super-linter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/super-linter/super-linter/compare/v5...v6)

---
updated-dependencies:
- dependency-name: super-linter/super-linter
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-19 11:55:18 +00:00
Nick Alteen
290a125e98 Merge pull request #28 from actions/codeowners
Update CODEOWNERS
2024-01-08 10:47:52 -05:00
Nick Alteen
3b5dba6d10 Update CODEOWNERS 2023-12-15 10:20:43 -05:00
Nick Alteen
469a269999 Merge pull request #27 from actions/dependabot/docker/docker-minor-a4fdb1f2bd
Bump the docker-minor group with 1 update
2023-12-11 09:29:28 -05:00
dependabot[bot]
211fd2c11a Bump the docker-minor group with 1 update
Bumps the docker-minor group with 1 update: alpine.


---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: docker-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-11 11:19:26 +00:00
Nick Alteen
147b26dda6 Merge pull request #24 from actions/dependencies
Update Dependabot Grouping
2023-12-01 11:08:40 -05:00
Nick Alteen
6e7b362362 Add missing perms 2023-12-01 09:09:41 -05:00
Nick Alteen
768e534a49 Merge pull request #25 from actions/codeowners
Document CODEOWNERS
2023-12-01 09:05:14 -05:00
Nick Alteen
06cd4dd20d Merge pull request #26 from actions/line-feed
Enforce line-ending style
2023-12-01 09:03:23 -05:00
Nick Alteen
650de4f8a2 Enforce line-ending style 2023-11-28 12:46:39 -05:00
Nick Alteen
bf6227bf36 Document CODEOWNERS 2023-11-28 11:32:35 -05:00
Nick Alteen
8b2413dfed Update permissions scope 2023-11-27 23:52:38 -05:00
Nick Alteen
7d6e75e1d8 Group dependencies 2023-11-27 23:52:28 -05:00
Nick Alteen
9a98c7445b Merge pull request #23 from ncalteen/license
Update LICENSE and Dependabot
2023-11-16 14:15:43 -05:00
Nick Alteen
95836f602f Change dependabot schedule 2023-11-16 10:20:52 -05:00
Nick Alteen
3e89fcb2f1 Update LICENSE to standard 2023-11-16 10:20:40 -05:00
Nick Alteen
77571553fd Merge pull request #21 from ncalteen/main
Update and reformat
2023-11-07 09:42:16 -05:00
Nick Alteen
fa3159f173 Update README.md 2023-09-19 09:22:33 -04:00
Nick Alteen
5234986e11 Update workflow output 2023-09-15 11:36:32 -04:00
Nick Alteen
d17ca00fba Update README and CODEOWNERS 2023-09-15 11:33:09 -04:00
Nick Alteen
f4d919cc58 Add dependabot and linting 2023-09-15 11:32:56 -04:00
Nick Alteen
72fed7c8ea Clarify entrypoint 2023-09-15 11:32:44 -04:00
Nick Alteen
8525b07536 Fix Dockerfile 2023-09-15 11:32:34 -04:00
Nick Alteen
cf21239949 Format action.yml 2023-09-15 11:32:21 -04:00
Nick Alteen
407d80e42d Add formatting with Prettier 2023-09-15 11:32:09 -04:00
Nick Alteen
b90d85ff05 Add gitignore 2023-09-15 11:31:59 -04:00
15 changed files with 347 additions and 35 deletions

1
.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
* text=auto eol=lf

21
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,21 @@
version: 2
updates:
- package-ecosystem: docker
directory: /
schedule:
interval: weekly
groups:
docker-minor:
update-types:
- minor
- patch
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
groups:
actions-minor:
update-types:
- minor
- patch

6
.github/linters/.checkov.yaml vendored Normal file
View File

@@ -0,0 +1,6 @@
quiet: true
skip-check:
# Ensure that HEALTHCHECK instructions have been added to container images
- CKV_DOCKER_2
# Ensure that a user for the container has been created
- CKV_DOCKER_3

7
.github/linters/.markdown-lint.yml vendored Normal file
View File

@@ -0,0 +1,7 @@
# Unordered list style
MD004:
style: dash
# Ordered list item prefix
MD029:
style: one

10
.github/linters/.yaml-lint.yml vendored Normal file
View File

@@ -0,0 +1,10 @@
rules:
document-end: disable
document-start:
level: warning
present: false
line-length:
level: warning
max: 80
allow-non-breakable-words: true
allow-non-breakable-inline-mappings: true

75
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,75 @@
name: Continuous Integration
on:
pull_request:
branches:
- main
push:
branches:
- main
permissions:
contents: read
jobs:
test-docker:
name: Docker Tests
runs-on: ubuntu-latest
# Run a local registry to push to
services:
registry:
image: registry:2
ports:
- 5001:5000
env:
TEST_TAG: localhost:5001/actions/hello-world-docer-action:latest
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v6
- name: Setup Docker BuildX
id: setup-buildx
uses: docker/setup-buildx-action@v3
with:
install: true
driver-opts: network=host
- name: Build the Container
id: build
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ env.TEST_TAG }}
- name: Run the Container
id: run
env:
INPUT_WHO_TO_GREET: Mona Lisa Octocat
run: |
docker run \
--env INPUT_WHO_TO_GREET="${{ env.INPUT_WHO_TO_GREET }}" \
--rm ${{ env.TEST_TAG }}
test-action:
name: GitHub Actions Test
runs-on: ubuntu-latest
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v6
- name: Test Local Action
id: test-action
uses: ./
with:
who-to-greet: Mona Lisa Octocat
- name: Print Output
id: output
run: echo "${{ steps.test-action.outputs.time }}"

37
.github/workflows/linter.yml vendored Normal file
View File

@@ -0,0 +1,37 @@
name: Lint Codebase
on:
pull_request:
branches:
- main
push:
branches:
- main
permissions:
contents: read
packages: read
statuses: write
jobs:
lint:
name: Lint Codebase
runs-on: ubuntu-latest
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Lint Codebase
id: super-linter
uses: super-linter/super-linter/slim@v8
env:
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_ALL_CODEBASE: true
VALIDATE_BIOME_FORMAT: false
VALIDATE_BIOME_LINT: false
VALIDATE_GITHUB_ACTIONS_ZIZMOR: false

25
.gitignore vendored Normal file
View File

@@ -0,0 +1,25 @@
# Logs
logs
*.log
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# dotenv environment variables file
.env
.env.test
# OS metadata
.DS_Store
Thumbs.db
# IDE files
.idea
.vscode
*.code-workspace

16
.prettierrc.json Normal file
View File

@@ -0,0 +1,16 @@
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": false,
"singleQuote": true,
"quoteProps": "as-needed",
"jsxSingleQuote": false,
"trailingComma": "none",
"bracketSpacing": true,
"bracketSameLine": true,
"arrowParens": "avoid",
"proseWrap": "always",
"htmlWhitespaceSensitivity": "css",
"endOfLine": "lf"
}

3
CODEOWNERS Normal file
View File

@@ -0,0 +1,3 @@
# Repository CODEOWNERS
* @actions/actions-oss-maintainers

View File

@@ -1,8 +1,18 @@
# Container image that runs your code
FROM alpine:3.10
# Set the base image to use for subsequent instructions
FROM alpine:3.23
# Copies your code file from your action repository to the filesystem path `/` of the container
COPY entrypoint.sh /entrypoint.sh
# Set the working directory inside the container
WORKDIR /usr/src
# Code file to execute when the docker container starts up (`entrypoint.sh`)
ENTRYPOINT ["/entrypoint.sh"]
# Copy any source file(s) required for the action
COPY entrypoint.sh .
# Create a non-root user and switch to it
RUN addgroup -S actiongroup && adduser -S actionuser -G actiongroup && \
chown -R actionuser:actiongroup /usr/src && \
chmod +x /usr/src/entrypoint.sh
USER actionuser
# Configure the container to be run as an executable
ENTRYPOINT ["/usr/src/entrypoint.sh"]

View File

@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2019 GitHub Actions
Copyright GitHub
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ 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.
SOFTWARE.

114
README.md
View File

@@ -1,23 +1,111 @@
# Hello world docker action
# Hello, World! Docker Action
This action prints "Hello World" to the log or "Hello" + the name of a person to greet. To learn how this action was built, see "[Creating a Docker container action](https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action)" in the GitHub Docs.
[![GitHub Super-Linter](https://github.com/actions/hello-world-docker-action/actions/workflows/linter.yml/badge.svg)](https://github.com/super-linter/super-linter)
![CI](https://github.com/actions/hello-world-docker-action/actions/workflows/ci.yml/badge.svg)
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](https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action).
## Create Your Own Action
To create your own action, you can use this repository as a template! Just
follow the below instructions:
1. Click the **Use this template** button at the top of the repository
1. Select **Create a new repository**
1. Select an owner and name for your new repository
1. Click **Create repository**
1. Clone your new repository
> [!CAUTION]
>
> Make sure to remove or update the [`CODEOWNERS`](./CODEOWNERS) file! For
> details on how to use this file, see
> [About code owners](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners).
## Usage
Here's an example of how to use this action in a workflow file:
```yaml
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.:
# actions/hello-world-docker-action@e76147da8e5c81eaf017dede5645551d4b94427b
# actions/hello-world-docker-action@v1.2.3
- name: Print to Log
id: print-to-log
uses: actions/hello-world-docker-action@main
with:
who-to-greet: ${{ inputs.who-to-greet }}
```
For example workflow runs, check out the
[Actions tab](https://github.com/actions/hello-world-docker-action/actions)!
:rocket:
## Inputs
### `who-to-greet`
**Required** The name of the person to greet. Default `"World"`.
| Input | Default | Description |
| -------------- | ------- | ------------------------------- |
| `who-to-greet` | `World` | The name of the person to greet |
## Outputs
### `time`
| Output | Description |
| ------ | ----------------------- |
| `time` | The time we greeted you |
The time we greeted you.
## Test Locally
## Example usage
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.
```yaml
uses: actions/hello-world-docker-action@main
with:
who-to-greet: 'Mona the Octocat'
```
> [!NOTE]
>
> You'll need to have a reasonably modern version of
> [Docker](https://www.docker.com/get-started/) handy (e.g. docker engine
> version 20 or later).
1. :hammer_and_wrench: Build the container
Make sure to replace `actions/hello-world-docker-action` with an appropriate
label for your container.
```bash
docker build -t actions/hello-world-docker-action .
```
1. :white_check_mark: Test the container
You can pass individual environment variables using the `--env` or `-e` flag.
```bash
$ docker run --env INPUT_WHO_TO_GREET="Mona Lisa Octocat" actions/hello-world-docker-action
::notice file=entrypoint.sh,line=7::Hello, Mona Lisa Octocat!
```
Or you can pass a file with environment variables using `--env-file`.
```bash
$ echo "INPUT_WHO_TO_GREET=\"Mona Lisa Octocat\"" > ./.env.test
$ docker run --env-file ./.env.test actions/hello-world-docker-action
::notice file=entrypoint.sh,line=7::Hello, Mona Lisa Octocat!
```

View File

@@ -1,15 +1,21 @@
name: 'Hello World'
description: 'Greet someone and record the time'
name: Hello, World!
description: Greet someone and record the time
author: GitHub Actions
# Define your inputs here.
inputs:
who-to-greet: # id of input
description: 'Who to greet'
who-to-greet:
description: Who to greet
required: true
default: 'World'
default: World
# Define your outputs here.
outputs:
time: # id of output
description: 'The time we greeted you'
time:
description: The time we greeted you
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.who-to-greet }}
using: docker
image: Dockerfile
env:
INPUT_WHO_TO_GREET: ${{ inputs.who-to-greet }}

View File

@@ -1,5 +1,12 @@
#!/bin/sh -l
echo "Hello $1"
time=$(date)
echo "time=$time" >> $GITHUB_OUTPUT
# Use INPUT_<INPUT_NAME> to get the value of an input
GREETING="Hello, $INPUT_WHO_TO_GREET!"
# Use workflow commands to do things like set debug messages
echo "::notice file=entrypoint.sh,line=7::$GREETING"
# Write outputs to the $GITHUB_OUTPUT file
echo "time=$(date)" >>"$GITHUB_OUTPUT"
exit 0