Skip to content

Commit

Permalink
ci: update workflow configs
Browse files Browse the repository at this point in the history
- Move `labeler` to `main` workflow
- Make `deploy` should only be triggered when `main` workflow completed

Signed-off-by: Fery Wardiyanto <[email protected]>
  • Loading branch information
feryardiant committed Feb 29, 2024
1 parent 971d45b commit e45c67f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 21 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ run-name: >-
deploy ${{ github.ref_name }} to ${{ github.event_name == 'workflow_dispatch' && inputs.target || 'staging' }}
on:
pull_request:
branches: [main]
release:
types: [published]
workflow_dispatch:
Expand All @@ -20,7 +18,6 @@ on:
workflow_run:
workflows: [Code Quality]
types: [completed]
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,24 @@ env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}

jobs:
labels:
name: Labels
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'

permissions:
contents: read
pull-requests: write

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Labeler
uses: actions/labeler@v5
with:
dot: true

prepare:
name: Prepare
# uses: creasico/laravel-project/.github/workflows/prepare.yml@main
Expand Down
18 changes: 0 additions & 18 deletions .github/workflows/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,6 @@ on:
value: ${{ jobs.build.outputs.target-url }}

jobs:
labels:
name: Labels
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'

permissions:
contents: read
pull-requests: write

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Labeler
uses: actions/labeler@v5
with:
dot: true

build:
runs-on: ubuntu-latest
name: Build for `${{ inputs.target }}`
Expand Down

0 comments on commit e45c67f

Please sign in to comment.