Skip to content

Result of tsccr-helper -log-level=info gha update -latest . #1246

Result of tsccr-helper -log-level=info gha update -latest .

Result of tsccr-helper -log-level=info gha update -latest . #1246

Workflow file for this run

name: docker
on:
push:
branches: main
paths-ignore:
- "**.md"
- "docs/**"
- "website/**"
- "cdk.tf/**"
- "tools/update-github-project-board/**"
workflow_dispatch: {}
jobs:
build-docker-image:
if: github.repository == 'hashicorp/terraform-cdk'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
- name: Cache Docker layers
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ hashFiles('/Dockerfile', '.terraform.versions.json') }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to DockerHub
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- id: tf-versions
run: |
DEFAULT_TERRAFORM_VERSION=$(cat .terraform.versions.json | jq -r '.default')
AVAILABLE_TERRAFORM_VERSIONS=$(cat .terraform.versions.json | jq -r '.available | join(" ")')
echo "default=$DEFAULT_TERRAFORM_VERSION" >> $GITHUB_OUTPUT
echo "available=$AVAILABLE_TERRAFORM_VERSIONS" >> $GITHUB_OUTPUT
- id: cdktf-version
run: |
CDKTF_VERSION=$(cat package.json | jq -r '.version')
echo "cdktf=$CDKTF_VERSION" >> $GITHUB_OUTPUT
- id: git-sha
run: |
GIT_SHA=$(git rev-parse HEAD)
echo "git-sha=$GIT_SHA" >> $GITHUB_OUTPUT
- name: Build and push
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0
with:
pull: true
push: true
tags: hashicorp/jsii-terraform:latest,hashicorp/jsii-terraform:${{ steps.cdktf-version.outputs.cdktf }},hashicorp/jsii-terraform:${{ steps.cdktf-version.outputs.cdktf }}-${{ steps.git-sha.outputs.git-sha }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
build-args: |
DEFAULT_TERRAFORM_VERSION=${{ steps.tf-versions.outputs.default }}
AVAILABLE_TERRAFORM_VERSIONS=${{ steps.tf-versions.outputs.available }}