mirror of
https://codeberg.org/JasterV/spazio-solazzo.git
synced 2026-04-27 02:25:40 +00:00
feat: separate between review & review-cleanup workflows
This commit is contained in:
parent
9c45660e11
commit
961b24b202
2 changed files with 26 additions and 20 deletions
25
.github/workflows/review-cleanup.yml
vendored
Normal file
25
.github/workflows/review-cleanup.yml
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
name: Cleanup Review App
|
||||
on:
|
||||
pull_request:
|
||||
types: [closed]
|
||||
|
||||
env:
|
||||
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
|
||||
APP_NAME: pr-${{ github.event.pull_request.number }}-jasterv-spazio-solazzo
|
||||
|
||||
jobs:
|
||||
review_app_cleanup:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
concurrency:
|
||||
group: pr-${{ github.event.number }}
|
||||
|
||||
environment:
|
||||
name: review
|
||||
|
||||
steps:
|
||||
- name: Destroy PR app
|
||||
uses: superfly/fly-pr-review-apps@1.5.0
|
||||
with:
|
||||
name: ${{ env.APP_NAME }}
|
||||
config: fly.review.toml
|
||||
21
.github/workflows/review.yml
vendored
21
.github/workflows/review.yml
vendored
|
|
@ -2,7 +2,7 @@ name: Deploy Review App
|
|||
on:
|
||||
# Run this workflow on every PR event. Existing review apps will be updated when the PR is updated.
|
||||
pull_request:
|
||||
types: [opened, reopened, synchronize, closed]
|
||||
types: [opened, reopened, synchronize]
|
||||
|
||||
env:
|
||||
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
|
||||
|
|
@ -12,12 +12,10 @@ env:
|
|||
|
||||
jobs:
|
||||
ci:
|
||||
if: github.event.action != 'closed'
|
||||
uses: ./.github/workflows/ci.yml
|
||||
secrets: inherit
|
||||
|
||||
build_and_deploy:
|
||||
if: github.event.action != 'closed'
|
||||
runs-on: ubuntu-latest
|
||||
needs: ci
|
||||
|
||||
|
|
@ -72,20 +70,3 @@ jobs:
|
|||
DATABASE_URL=${{ secrets.DATABASE_URL }}
|
||||
SECRET_KEY_BASE=${{ secrets.SECRET_KEY_BASE }}
|
||||
PHX_HOST=${{ env.APP_NAME }}.fly.dev
|
||||
|
||||
review_app_cleanup:
|
||||
if: github.event.action == 'closed'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
concurrency:
|
||||
group: pr-${{ github.event.number }}
|
||||
|
||||
environment:
|
||||
name: review
|
||||
|
||||
steps:
|
||||
- name: Destroy PR app
|
||||
uses: superfly/fly-pr-review-apps@1.5.0
|
||||
with:
|
||||
name: ${{ env.APP_NAME }}
|
||||
config: fly.review.toml
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue