|
2 | 2 |
|
3 | 3 | <!-- markdownlint-disable --> |
4 | 4 | <a href="https://cpco.io/homepage"><img src="https://github.com/cloudposse/github-action-docker-build-push/blob/main/.github/banner.png?raw=true" alt="Project Banner"/></a><br/> |
5 | | - <p align="right"> |
6 | | -<a href="https://github.com/cloudposse/github-action-docker-build-push/releases/latest"><img src="https://img.shields.io/github/release/cloudposse/github-action-docker-build-push.svg" alt="Latest Release"/></a><a href="https://slack.cloudposse.com"><img src="https://slack.cloudposse.com/badge.svg" alt="Slack Community"/></a></p> |
| 5 | + |
| 6 | + |
| 7 | +<p align="right"><a href="https://github.com/cloudposse/github-action-docker-build-push/releases/latest"><img src="https://img.shields.io/github/release/cloudposse/github-action-docker-build-push.svg?style=for-the-badge" alt="Latest Release"/></a><a href="https://github.com/cloudposse/github-action-docker-build-push/commits"><img src="https://img.shields.io/github/last-commit/cloudposse/github-action-docker-build-push.svg?style=for-the-badge" alt="Last Updated"/></a><a href="https://cloudposse.com/slack"><img src="https://slack.cloudposse.com/for-the-badge.svg" alt="Slack Community"/></a> |
| 8 | + |
| 9 | +</p> |
7 | 10 | <!-- markdownlint-restore --> |
8 | 11 |
|
9 | 12 | <!-- |
@@ -90,50 +93,10 @@ Build Docker image and push it. |
90 | 93 |
|
91 | 94 |
|
92 | 95 |
|
93 | | -<!-- markdownlint-disable --> |
94 | 96 |
|
95 | | -## Inputs |
96 | | - |
97 | | -| Name | Description | Default | Required | |
98 | | -|------|-------------|---------|----------| |
99 | | -| allow | List of extra privileged entitlement (e.g., network.host,security.insecure) | N/A | false | |
100 | | -| binfmt-image | Binfmt image | public.ecr.aws/eks-distro-build-tooling/binfmt-misc:qemu-v7.0.0 | false | |
101 | | -| build-args | List of build-time variables | N/A | false | |
102 | | -| build-contexts | List of additional build contexts (e.g., name=path) | N/A | false | |
103 | | -| buildkitd-flags | BuildKit daemon flags | --allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host | false | |
104 | | -| cache-from | List of external cache sources for buildx (e.g., user/app:cache, type=local,src=path/to/dir) | type=gha | false | |
105 | | -| cache-to | List of cache export destinations for buildx (e.g., user/app:cache, type=local,dest=path/to/dir) | type=gha,mode=max | false | |
106 | | -| debug | Enable debug mode | false | false | |
107 | | -| docker-metadata-pr-head-sha | Set to `true` to tag images with the PR HEAD SHA instead of the merge commit SHA within pull requests. | false | false | |
108 | | -| driver-opts | List of additional driver-specific options. (eg. image=moby/buildkit:master) | image=public.ecr.aws/vend/moby/buildkit:buildx-stable-1 | false | |
109 | | -| file | Dockerfile name | Dockerfile | false | |
110 | | -| image\_name | Image name (excluding registry). Defaults to {{$organization/$repository}}. | | false | |
111 | | -| inspect | Set to `true` will pull and inspect the image and output it to the step summary. | false | false | |
112 | | -| login | Docker login | | false | |
113 | | -| network | Set the networking mode for the RUN instructions during build | N/A | false | |
114 | | -| no-cache | Send the --no-cache flag to the docker build process | false | false | |
115 | | -| organization | Organization | N/A | true | |
116 | | -| password | Docker password | | false | |
117 | | -| platforms | List of target platforms for build (e.g. linux/amd64,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,etc) | linux/amd64 | false | |
118 | | -| provenance | Generate provenance attestation for the build | N/A | false | |
119 | | -| registry | Docker registry | N/A | true | |
120 | | -| repository | Repository | N/A | true | |
121 | | -| secret-files | List of secret files to expose to the build (e.g., key=filename, MY\_SECRET=./secret.txt) | N/A | false | |
122 | | -| secrets | List of secrets to expose to the build (e.g., key=string, GIT\_AUTH\_TOKEN=mytoken) | N/A | false | |
123 | | -| ssh | List of SSH agent socket or keys to expose to the build | N/A | false | |
124 | | -| tags | List of tags (supports https://github.com/docker/metadata-action#tags-input) | N/A | false | |
125 | | -| target | Sets the target stage to build | | false | |
126 | | -| workdir | Working directory | ./ | false | |
127 | | - |
128 | | - |
129 | | -## Outputs |
130 | | - |
131 | | -| Name | Description | |
132 | | -|------|-------------| |
133 | | -| image | Docker image name | |
134 | | -| metadata | Docker image metadata | |
135 | | -| tag | Docker image tag | |
136 | | -<!-- markdownlint-restore --> |
| 97 | + |
| 98 | + |
| 99 | + |
137 | 100 |
|
138 | 101 |
|
139 | 102 | ## Related Projects |
@@ -174,7 +137,36 @@ In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow. |
174 | 137 | 5. **Push** your work back up to your fork |
175 | 138 | 6. Submit a **Pull Request** so that we can review your changes |
176 | 139 |
|
177 | | -**NOTE:** Be sure to merge the latest changes from "upstream" before making a pull request! |
| 140 | +**NOTE:** Be sure to merge the latest changes from "upstream" before making a pull request!## Running Terraform Tests |
| 141 | + |
| 142 | +We use [Atmos](https://atmos.tools) to streamline how Terraform tests are run. It centralizes configuration and wraps common test workflows with easy-to-use commands. |
| 143 | + |
| 144 | +All tests are located in the [`test/`](test) folder. |
| 145 | + |
| 146 | +Under the hood, tests are powered by Terratest together with our internal [Test Helpers](https://github.com/cloudposse/test-helpers) library, providing robust infrastructure validation. |
| 147 | + |
| 148 | +Setup dependencies: |
| 149 | +- Install Atmos ([installation guide](https://atmos.tools/install/)) |
| 150 | +- Install Go [1.24+ or newer](https://go.dev/doc/install) |
| 151 | +- Install Terraform or OpenTofu |
| 152 | + |
| 153 | +To run tests: |
| 154 | + |
| 155 | +- Run all tests: |
| 156 | + ```sh |
| 157 | + atmos test run |
| 158 | + ``` |
| 159 | +- Clean up test artifacts: |
| 160 | + ```sh |
| 161 | + atmos test clean |
| 162 | + ``` |
| 163 | +- Explore additional test options: |
| 164 | + ```sh |
| 165 | + atmos test --help |
| 166 | + ``` |
| 167 | +The configuration for test commands is centrally managed. To review what's being imported, see the [`atmos.yaml`](https://raw.githubusercontent.com/cloudposse/.github/refs/heads/main/.github/atmos/terraform-module.yaml) file. |
| 168 | + |
| 169 | +Learn more about our [automated testing in our documentation](https://docs.cloudposse.com/community/contribute/automated-testing/) or implementing [custom commands](https://atmos.tools/core-concepts/custom-commands/) with atmos. |
178 | 170 |
|
179 | 171 | ### 🌎 Slack Community |
180 | 172 |
|
@@ -226,7 +218,7 @@ All other trademarks referenced herein are the property of their respective owne |
226 | 218 |
|
227 | 219 |
|
228 | 220 | --- |
229 | | -Copyright © 2017-2024 [Cloud Posse, LLC](https://cpco.io/copyright) |
| 221 | +Copyright © 2017-2025 [Cloud Posse, LLC](https://cpco.io/copyright) |
230 | 222 |
|
231 | 223 |
|
232 | 224 | <a href="https://cloudposse.com/readme/footer/link?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/github-action-docker-build-push&utm_content=readme_footer_link"><img alt="README footer" src="https://cloudposse.com/readme/footer/img"/></a> |
|
0 commit comments