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

chore: update stack ttls #139

Merged
merged 2 commits into from
Aug 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: 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
Loading