Skip to content

chore: remove Homebrew publishing step from release #1309

chore: remove Homebrew publishing step from release

chore: remove Homebrew publishing step from release #1309

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@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
- name: Cache Docker layers
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
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@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.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@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.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 }}