Skip to content

Commit

Permalink
Add image for tf ecosystem (#22)
Browse files Browse the repository at this point in the history
* Add image for `terragrunt`

* Repurposing pull request to `tf` ecosystem

---------

Co-authored-by: Pedro Rodrigues <hpedrorodrigues@users.noreply.github.com>
  • Loading branch information
hpedrorodrigues and hpedrorodrigues authored Jul 22, 2024
1 parent 385ad31 commit 5e53d42
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/tf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: tf
on:
schedule:
- cron: '0 0 * * *'
push:
branches:
- main
paths:
- '.github/workflows/_shared**'
- '.github/workflows/tf.yml'
- 'tf/**'
pull_request:
paths:
- '.github/workflows/_shared**'
- '.github/workflows/tf.yml'
- 'tf/**'
workflow_dispatch:
jobs:
build:
if: github.event_name == 'pull_request'
uses: ./.github/workflows/_shared_build.yml
with:
owner: ${{ github.repository_owner }}
image: tf
version: pr-${{ github.event.pull_request.head.sha }}
publish:
permissions:
actions: read
contents: read
id-token: write
packages: write
if: github.event_name != 'pull_request'
uses: ./.github/workflows/_shared_publish.yml
with:
owner: ${{ github.repository_owner }}
image: tf
version: 1.${{ github.run_number }}.${{ github.run_attempt }}
revision: ${{ github.sha }}
secrets:
dh_token: ${{ secrets.DOCKERHUB_TOKEN }}
gcr_token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- [prettier](./prettier)
- [shellcheck](./shellcheck)
- [shfmt](./shfmt)
- [tf](./tf)

## Development

Expand Down
3 changes: 3 additions & 0 deletions tf/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.tar
*.cdx
*.json
13 changes: 13 additions & 0 deletions tf/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# tf

Simple image containing [Terraform][terraform], [OpenTofu][opentofu] and [Terragrunt][terragrunt].

## Usage

```bash
docker pull ghcr.io/hpedrorodrigues/tf
```

[terraform]: https://www.terraform.io
[opentofu]: https://opentofu.org
[terragrunt]: https://terragrunt.gruntwork.io
7 changes: 7 additions & 0 deletions tf/Taskfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: '3'

includes:
common:
taskfile: ../.tasks.yml
vars:
IMAGE: tf
24 changes: 24 additions & 0 deletions tf/tf.apko.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
contents:
repositories:
- https://packages.wolfi.dev/os
keyring:
- https://packages.wolfi.dev/os/wolfi-signing.rsa.pub
packages:
- terraform
- opentofu
- terragrunt

archs:
- x86_64
- aarch64

environment:
PATH: /usr/sbin:/sbin:/usr/bin:/bin

work-dir: /mnt

annotations:
org.opencontainers.image.title: tf
org.opencontainers.image.description: Simple image containing Terraform, OpenTofu and Terragrunt.
org.opencontainers.image.authors: Pedro Rodrigues <github.com/hpedrorodrigues>
org.opencontainers.image.source: https://github.com/hpedrorodrigues/images/tree/main/tf

0 comments on commit 5e53d42

Please sign in to comment.