forked from octo-sts/app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "add verify prod and refactor terraform check/deploy (octo-sts…
- Loading branch information
Showing
3 changed files
with
46 additions
and
270 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,9 +9,7 @@ on: | |
- "main" | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: deploy | ||
cancel-in-progress: false | ||
concurrency: deploy | ||
|
||
jobs: | ||
deploy: | ||
|
@@ -22,22 +20,48 @@ jobs: | |
id-token: write # federates with GCP | ||
|
||
steps: | ||
- uses: ./.github/workflows/.terraform.yaml | ||
with: | ||
project_id: 'octo-sts' | ||
workload_identity_provider: 'projects/96355665038/locations/global/workloadIdentityPools/github-pool/providers/github-provider' | ||
service_account: '[email protected]' | ||
working_directory: ./iac | ||
|
||
- 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 }} | ||
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v3 | ||
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 | ||
with: | ||
go-version-file: './go.mod' | ||
check-latest: true | ||
|
||
- uses: google-github-actions/auth@55bd3a7c6e2ae7cf1877fd1ccb9d54c0503c457c # v2.1.2 | ||
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: '[email protected]' | ||
|
||
- uses: 'docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20' # v2 | ||
with: | ||
username: 'oauth2accesstoken' | ||
password: '${{ steps.auth.outputs.access_token }}' | ||
registry: 'gcr.io' | ||
|
||
# Attempt to deploy the terraform configuration | ||
- uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8 # v2.0.0 | ||
with: | ||
terraform_version: 1.6 | ||
|
||
- 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 }} |
This file was deleted.
Oops, something went wrong.