Skip to content

Commit

Permalink
Use a callable workflow for lint
Browse files Browse the repository at this point in the history
  • Loading branch information
roryabraham committed Jun 28, 2022
1 parent 84f6bbe commit a9f7166
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Lint JavaScript

on:
workflow_dispatch:
workflow_call:
pull_request:
types: [opened, synchronize]
branches-ignore: [staging, production]

jobs:
lint:
if: ${{ github.actor != 'OSBotify' || github.event_name == 'workflow_dispatch' }}
if: ${{ github.actor != 'OSBotify' || github.event_name == 'workflow_call' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/preDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,14 @@ on:
branches: [main]

jobs:
lint:
uses: ./.github/workflows/lint.yml

confirmPassingBuild:
runs-on: ubuntu-latest
needs: lint

steps:
- name: Run lint
id: lint
uses: Expensify/App/.github/actions/triggerWorkflowAndWait@main
with:
WORKFLOW: lint.yml
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}

- name: Run tests
id: tests
uses: Expensify/App/.github/actions/triggerWorkflowAndWait@main
Expand Down

0 comments on commit a9f7166

Please sign in to comment.