Skip to content

Commit

Permalink
Add terraform version (#32)
Browse files Browse the repository at this point in the history
* Update awscli.yml

* Update awscli.yml

* Update to use GITHUB_TOKEN

* Update Build and push Docker images Action to latest version

* add new tf versions
  • Loading branch information
SadriG91 committed Oct 20, 2023
1 parent e80dc56 commit d2ecc67
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
run: |
matrixJsonObject=$(echo $GIT_DIFF_FILTERED | jq --raw-input --raw-output 'gsub("'"'"'"; "") | split(" ") | map( { Dockerfile:.} ) | { include:. } | tostring')
echo "::set-output name=matrix_json::$matrixJsonObject"
echo $matrixJsonObject
echo $matrix_json
docker_image_build:
needs: build_matrix
Expand All @@ -39,6 +41,8 @@ jobs:
- name: get version tag
id: versionTag
run: |
echo ${{ needs.build_matrix.outputs.matrix_json }}
echo ${{ fromJson(needs.build_matrix.outputs.matrix_json) }}
versionTag=$(head -1 ./${{ matrix.Dockerfile }} | grep -o '[0-9.]\+' )
echo "versionTag=$versionTag" >> $GITHUB_ENV
Expand Down
10 changes: 10 additions & 0 deletions terraform/1.1.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM hashicorp/terraform:1.1.0 as resource
RUN apk add --update --no-cache \
ncurses \
make \
curl
RUN curl -sL https://taskfile.dev/install.sh | sh

FROM resource
ENTRYPOINT [ "terraform" ]
CMD [ "--help" ]
10 changes: 10 additions & 0 deletions terraform/1.2.5/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM hashicorp/terraform:1.2.5 as resource
RUN apk add --update --no-cache \
ncurses \
make \
curl
RUN curl -sL https://taskfile.dev/install.sh | sh

FROM resource
ENTRYPOINT [ "terraform" ]
CMD [ "--help" ]
10 changes: 10 additions & 0 deletions terraform/1.3.4/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM hashicorp/terraform:1.3.4 as resource
RUN apk add --update --no-cache \
ncurses \
make \
curl
RUN curl -sL https://taskfile.dev/install.sh | sh

FROM resource
ENTRYPOINT [ "terraform" ]
CMD [ "--help" ]

0 comments on commit d2ecc67

Please sign in to comment.