Skip to content

Commit

Permalink
Pv/ci (#4)
Browse files Browse the repository at this point in the history
* fix CI variable interpolation
  • Loading branch information
Phil Varner authored May 17, 2024
1 parent e2a8e81 commit 8e6cb71
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
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

0 comments on commit 8e6cb71

Please sign in to comment.