Skip to content

Commit

Permalink
feat: add PR target workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
coroiu committed Dec 10, 2024
1 parent fbadf16 commit a849fb5
Show file tree
Hide file tree
Showing 7 changed files with 132 additions and 1,485 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/build-browser-target.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build Browser on PR Target

on:
pull_request:
types: [opened, synchronize]
branches-ignore:
- 'l10n_master'
- 'cf-pages'
paths:
- 'apps/browser/**'
- 'libs/**'
- '*'
- '!*.md'
- '!*.txt'
workflow_call:
inputs: {}
workflow_dispatch:
inputs:
sdk_branch:
description: "Custom SDK branch"
required: false
type: string

defaults:
run:
shell: bash

jobs:
check-run:
name: Check PR run
uses: bitwarden/gh-actions/.github/workflows/check-run.yml@main

run-workflow:
name: Run Build Browser on PR Target
needs: check-run
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
uses: ./.github/workflows/build-browser.yml
secrets: inherit

39 changes: 39 additions & 0 deletions .github/workflows/build-cli-target.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build CLI on PR Target

on:
pull_request:
types: [opened, synchronize]
branches-ignore:
- 'l10n_master'
- 'cf-pages'
paths:
- 'apps/cli/**'
- 'libs/**'
- '*'
- '!*.md'
- '!*.txt'
- '.github/workflows/build-cli.yml'
- 'bitwarden_license/bit-cli/**'
workflow_dispatch:
inputs:
sdk_branch:
description: "Custom SDK branch"
required: false
type: string

defaults:
run:
shell: bash

jobs:
check-run:
name: Check PR run
uses: bitwarden/gh-actions/.github/workflows/check-run.yml@main

run-workflow:
name: Run Build CLI on PR Target
needs: check-run
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
uses: ./.github/workflows/build-cli.yml
secrets: inherit

2 changes: 2 additions & 0 deletions .github/workflows/build-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ on:
- '!*.txt'
- '.github/workflows/build-cli.yml'
- 'bitwarden_license/bit-cli/**'
workflow_call:
inputs: {}
workflow_dispatch:
inputs:
sdk_branch:
Expand Down
Loading

0 comments on commit a849fb5

Please sign in to comment.