Skip to content

Commit

Permalink
Merge pull request #59 from hashicorp/add-revision-input
Browse files Browse the repository at this point in the history
adding optional REVISION input
  • Loading branch information
sarahethompson authored Jun 29, 2023
2 parents 4ae024a + 240c2ac commit bc2a4ff
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ see note on `redhat_tag` below.
### Action Inputs Explained

- **`version`** is the product version we are building a docker image for.
- **`revision`** is the revision that's being built.
This may differ from the default <github.sha> which is the ref the action was invoked at.
- **`target`** is the name of the "stage" or "target" in the Dockerfile to build.
- **`arch`** is the architecture we're building for.
- **`tags`** is a newline-separated list of the "production tags" for this image.
Expand Down
9 changes: 8 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ inputs:
description: Target image architecture.
required: true

revision:
description: >
Full sha of the commit that is being built.
This may differ from the default <github.sha> which is the ref the action
was invoked at.
default: "${{ github.sha }}"

tags:
description: >
Whitespace-separated fully-qualified image names to use for production releases.
Expand Down Expand Up @@ -114,7 +121,7 @@ runs:
env:

# Required.
REVISION: "${{ github.sha }}"
REVISION: "${{ inputs.revision }}"
VERSION: "${{ inputs.version }}"
ARCH: "${{ inputs.arch }}"
TAGS: "${{ inputs.tags }}"
Expand Down

0 comments on commit bc2a4ff

Please sign in to comment.