Skip to content

use workspace id

use workspace id #40

name: Integrations / Terraform Cloud Scanner
on:
pull_request:
branches: ["*"]
paths:
- integrations/terraform-cloud-scanner/**
- .github/workflows/integrations-terraform-cloud-scanner.yaml
- pnpm-lock.yaml
push:
branches: ["main"]
paths:
- integrations/terraform-cloud-scanner/**
- .github/workflows/integrations-terraform-cloud-scanner.yaml
- pnpm-lock.yaml
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ctrlplane/terraform-cloud-scanner
tags: |
type=sha,format=short,prefix=
- name: Build
uses: docker/build-push-action@v6
if: github.ref != 'refs/heads/main'
with:
push: false
file: integrations/terraform-cloud-scanner/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
- name: Build and Push
uses: docker/build-push-action@v6
if: github.ref == 'refs/heads/main'
with:
push: true
file: integrations/terraform-cloud-scanner/Dockerfile
tags: ${{ steps.meta.outputs.tags }}