Skip to content

Bump the all group with 2 updates (#537) #218

Bump the all group with 2 updates (#537)

Bump the all group with 2 updates (#537) #218

Workflow file for this run

# Copyright 2024 Chainguard, Inc.
# SPDX-License-Identifier: Apache-2.0
name: Deploy to Cloud Run
on:
push:
branches:
- "main"
workflow_dispatch:
concurrency: deploy
jobs:
deploy:
runs-on: ubuntu-latest
if: github.repository == 'octo-sts/app'
permissions:
contents: read # clone the repository contents
id-token: write # federates with GCP
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v3
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: './go.mod'
check-latest: true
- uses: google-github-actions/auth@62cf5bd3e4211a0a0b51f2c6d6a37129d828611d # v2.1.5
id: auth
with:
token_format: 'access_token'
project_id: 'octo-sts'
workload_identity_provider: 'projects/96355665038/locations/global/workloadIdentityPools/github-pool/providers/github-provider'
service_account: 'github-identity@octo-sts.iam.gserviceaccount.com'
- uses: 'docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567' # v2
with:
username: 'oauth2accesstoken'
password: '${{ steps.auth.outputs.access_token }}'
registry: 'gcr.io'
# 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
terraform apply -auto-approve
- uses: rtCamp/action-slack-notify@4e5fb42d249be6a45a298f3c9543b111b02f7907 # v2.3.0
if: ${{ failure() }}
env:
SLACK_ICON: http://github.com/chainguard-dev.png?size=48
SLACK_USERNAME: guardian
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: 'octo-sts-alerts' # Use a channel
SLACK_COLOR: '#8E1600'
MSG_MINIMAL: 'true'
SLACK_TITLE: Deploying OctoSTS to Cloud Run failed
SLACK_MESSAGE: |
For detailed logs: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}