Skip to content

Commit

Permalink
Add action for linting
Browse files Browse the repository at this point in the history
  • Loading branch information
levieggertcru committed Oct 4, 2024
1 parent c4d5ef6 commit fd655c6
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 3 deletions.
11 changes: 11 additions & 0 deletions .github/actions/pod-lib-lint/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: 'Run Pod Lib Lint'
description: 'This action contains steps for running pod lib lint against a podspec.'
runs:
using: "composite"
steps:
- name: Pod Repo Update
shell: bash
run: pod repo update
- name: Lint Podspec
shell: bash
run: pod lib lint --private --verbose --sources=https://github.com/CruGlobal/cocoapods-specs.git,https://cdn.cocoapods.org/
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ jobs:
lint_ios_podspec:
name: Lint iOS Podspec
runs-on: macos-14
if: github.event_name == 'pull_request'
if: (github.event_name == 'push' && github.ref == 'refs/heads/main')
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Lint Podspec
run: pod lib lint --private --verbose --sources=https://github.com/CruGlobal/cocoapods-specs.git,https://cdn.cocoapods.org/
- name: Pod Lib Lint
uses: ./.github/actions/pod-lib-lint

current_version:
name: Store Current Version
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/lint-podspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Lint Podspec

on:
push:
branches: [ feature/*, versions/* ]
pull_request:
branches: [ feature/*, versions/* ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint_ios_podspec:
name: Lint iOS Podspec
runs-on: macos-14
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Pod Lib Lint
uses: ./.github/actions/pod-lib-lint

0 comments on commit fd655c6

Please sign in to comment.