Skip to content

Commit

Permalink
ci: release cycle fixes (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
priyanshuverma-dev authored Nov 20, 2024
1 parent ba86cfe commit f329151
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 24 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: Build and Publish Docker Image

on:
workflow_run:
workflows:
- Release
types:
- completed
workflow_dispatch:
release:
types: [released]

jobs:
tests:
uses: ./.github/workflows/test.yml
build-and-publish:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
needs: [tests]
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
name: Lint Codebase

on:
merge_group:
types: [synchronize, closed, checks_requested]

pull_request:
branches:
- dev
workflow_call:

jobs:
lint:
Expand Down
15 changes: 3 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ name: Test
on:
workflow_call:
workflow_dispatch:
inputs:
triggered_by_release:
type: boolean
default: false
pull_request:
branches:
- dev
Expand All @@ -15,10 +11,11 @@ on:
types: [synchronize, closed, checks_requested] # Trigger when pull request is synchronized or closed

jobs:
lint:
uses: ./.github/workflows/lint.yml
test:
needs: [lint]
runs-on: ubuntu-latest
outputs:
triggered_by_release: ${{ steps.set_release_flag.outputs.triggered_by_release }}
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -37,9 +34,3 @@ jobs:
- name: Run tests
run: bun run test

- name: Set Release Flag
id: set_release_flag
run: |
echo "triggered_by_release=${{ github.event.inputs.triggered_by_release }}" >> $GITHUB_ENV
echo "::set-output name=triggered_by_release::${{ github.event.inputs.triggered_by_release }}"

0 comments on commit f329151

Please sign in to comment.