Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pv/ci #4

Merged
merged 7 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ env:
PROJECT_NAME: mmw
FILMDROP_TERRAFORM_RELEASE: v2.23.0 # keep this up to date!
STAGE: staging
CI: true

on:
push:
Expand All @@ -14,14 +13,15 @@ on:
jobs:
deploy:
environment:
name: ${STAGE}
url: https://tiler.${STAGE}.modelmywatershed.org
name: ${{ env.STAGE }}
url: https://tiler.${{ env.STAGE }}.modelmywatershed.org
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: hashicorp/setup-terraform@v3
with:
terraform_version: "1.7.5"
Expand Down Expand Up @@ -80,7 +80,9 @@ jobs:
role-to-assume: ${{ secrets.AWS_ROLE }}
role-session-name: GitHubReleaseApply

- run: terraform apply -lock=false -input=false ${STAGE}.tfplan
- name: Terraform Apply
id: tf_apply
run: terraform apply -lock=false -input=false ${STAGE}.tfplan

- name: Post status to Slack channel
id: tf_apply_successs
Expand All @@ -89,7 +91,7 @@ jobs:
uses: slackapi/[email protected]
with:
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
slack-message: ":badger_dance: ${PROJECT_NAME}-${STAGE}-titiler ${{ github.ref_name }} terraform apply job has succeeded!\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
slack-message: ":badger_dance: ${{ env.PROJECT_NAME }}-${{ env.STAGE }}-titiler ${{ github.ref_name }} terraform apply job has succeeded!\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

Expand All @@ -100,6 +102,6 @@ jobs:
uses: slackapi/[email protected]
with:
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
slack-message: ":sadpanda: ${PROJECT_NAME}-${STAGE}-titiler ${{ github.ref_name }} terraform apply has failed!\n:alert: make sure cleanup job deletes all AWS resources!\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
slack-message: ":sadpanda: ${{ env.PROJECT_NAME }}-${{ env.STAGE }}-titiler ${{ github.ref_name }} terraform apply has failed!\n:alert: make sure cleanup job deletes all AWS resources!\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
3 changes: 0 additions & 3 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
name: Pre-commit CI

env:
CI: true

on:
push

Expand Down