Skip to content

Commit

Permalink
Merge pull request #139 from jbrunton/update-stack-ttls
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrunton authored Aug 17, 2024
2 parents fd12443 + 1aa2953 commit 4b0674d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/cleanup-stacks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: cleanup-stacks

on:
schedule:
- cron: '0 0 * * *'
- cron: "0 0 * * *"
workflow_dispatch:

jobs:
Expand All @@ -19,9 +19,19 @@ jobs:
policies:
dev:
match:
name: '!production'
name: '!(staging|production)'
ttl:
hours: 6
staging:
match:
name: staging
ttl:
hours: 24
production:
match:
name: production
ttl:
hours: 24
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ name: deploy-dev
on:
workflow_dispatch:

concurrency: ${{ github.head_ref }}
concurrency: ${{ github.head_ref || github.ref_name }}

jobs:

build-api:
uses: jbrunton/workflows/.github/workflows/build-image.yml@develop
with:
Expand All @@ -22,14 +21,14 @@ jobs:
deploy-app:
environment:
name: Development
url: https://chat-demo-${{ github.head_ref }}.dev.jbrunton-aws.com
url: https://chat-demo-${{ github.head_ref || github.ref_name }}.dev.jbrunton-aws.com
needs: [build-api]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build Client
env:
VITE_API_URL: https://chat-demo-api-${{ github.head_ref }}.dev.jbrunton-aws.com
VITE_API_URL: https://chat-demo-api-${{ github.head_ref || github.ref_name }}.dev.jbrunton-aws.com
run: |
npm ci
npm run build
Expand All @@ -39,7 +38,7 @@ jobs:
- uses: pulumi/actions@v3
with:
command: up
stack-name: ${{ github.head_ref }}
stack-name: ${{ github.head_ref || github.ref_name }}
upsert: true
work-dir: pulumi
comment-on-pr: true
Expand Down

0 comments on commit 4b0674d

Please sign in to comment.