Skip to content

Commit

Permalink
feat: add branch filtering to deployment workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
jhonylucas74 committed Sep 13, 2024
1 parent 63e3157 commit 4c6ed69
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Deploy (Development)
on:
workflow_run:
workflows: [Release Image (Development)]
branches: [dev]
types: [completed]
workflow_dispatch:
jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Deploy (Staging)
on:
workflow_run:
workflows: [Release Image (Staging)]
branches: [main]
branches: [staging]
types: [completed]
workflow_dispatch:
jobs:
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/release-dev.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
---
name: Release Image (Development)
on:
pull_request:
types: [labeled]
push:
branches:
- dev
workflow_dispatch:
inputs:
branch:
description: 'Branch to deploy (must be dev)'
required: true
default: 'dev'
jobs:
release-docker:
name: Release Image
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/release-prod.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
---
name: Release Image (Production)
on: workflow_dispatch
on:
push:
branches:
- main
workflow_dispatch:
inputs:
branch:
description: 'Branch to deploy (must be main)'
required: true
default: 'main'
jobs:
release-docker:
name: Release Image
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/release-staging.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
---
name: Release Image (Staging)
on:
push:
branches:
- staging
workflow_dispatch:
inputs:
branch:
description: 'Branch to deploy (must be staging)'
required: true
default: 'staging'
jobs:
release-docker:
name: Release Image
Expand Down

0 comments on commit 4c6ed69

Please sign in to comment.