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

refactor(ci): new ci-cd proposal POC #5

Merged
merged 1 commit into from
Oct 22, 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
11 changes: 11 additions & 0 deletions .github/workflows/branch.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: CI/CD Dev Branch

on:
push:
branches:
- dev

jobs:
deploy:
uses: kurocado-studio/styleguide/.github/workflows/composite.deploy.yml@main
secrets: inherit
22 changes: 2 additions & 20 deletions .github/workflows/ci.yml → .github/workflows/branch.main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ permissions:
pull-requests: write

on:
pull_request:
push:
branches:
- main
- dev

jobs:
lint:
Expand All @@ -32,24 +30,8 @@ jobs:
needs: document
uses: kurocado-studio/styleguide/.github/workflows/composite.release.yml@main
secrets: inherit
if: |
github.event_name == 'push' &&
github.ref == 'refs/heads/main'

deploy:
needs: release
name: Deploy app
runs-on: ubuntu-latest
concurrency: deploy-group
if: |
github.event_name == 'push' &&
(
github.ref == 'refs/heads/main' ||
github.ref == 'refs/heads/dev'
)
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
uses: kurocado-studio/styleguide/.github/workflows/composite.deploy.yml@main
secrets: inherit
14 changes: 14 additions & 0 deletions .github/workflows/branch.pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: CI/CD Pull Request

on:
pull_request:

jobs:
lint:
uses: kurocado-studio/styleguide/.github/workflows/composite.lint.yml@main
secrets: inherit

test:
needs: lint
uses: kurocado-studio/styleguide/.github/workflows/composite.test.yml@main
secrets: inherit