Skip to content

Merge pull request #193 from sigstore/dependabot/go_modules/gomod-f06… #146

Merge pull request #193 from sigstore/dependabot/go_modules/gomod-f06…

Merge pull request #193 from sigstore/dependabot/go_modules/gomod-f06… #146

Workflow file for this run

# Copyright 2024 The Sigstore Authors
# SPDX-License-Identifier: Apache-2.0
name: deploy-terraform
on:
push:
branches:
- "main"
workflow_dispatch:
concurrency: deploy
permissions: {}
jobs:
deploy:
runs-on: ubuntu-latest
if: github.repository == 'sigstore/sigstore-devops-tools'
permissions:
contents: read # clone the repository contents
id-token: write # federates with GCP
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
go-version-file: './go.mod'
check-latest: true
- uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0
id: auth
with:
workload_identity_provider: "projects/801815070094/locations/global/workloadIdentityPools/tooling-pool/providers/github-actions-provider"
service_account: "[email protected]"
# Attempt to deploy the terraform configuration
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v2.0.0
with:
terraform_version: '1.9'
- working-directory: ./iac
run: |
terraform init
terraform plan -out=plan.out
terraform apply -auto-approve "plan.out"
- uses: rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661 # v2.3.3
if: ${{ failure() }}
env:
SLACK_ICON: http://github.com/chainguard-dev.png?size=48
SLACK_USERNAME: guardian
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: 'sigstore-devops-tools-alerts' # Use a channel
SLACK_COLOR: '#8E1600'
MSG_MINIMAL: 'true'
SLACK_TITLE: Deploying sigstore-devops-tools failed
SLACK_MESSAGE: |
For detailed logs: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}