Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run check-version CI only on PRs with main as the branch target #324

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/actions/run-check-version/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: "Check SDK versions match"
description: |
Run check-version to ensure versions match when the target branch is main

runs:
using: composite
steps:
# Install node and pnpm.
- uses: actions/setup-node@v3
with:
node-version-file: .node-version
registry-url: "https://registry.npmjs.org"
- uses: pnpm/action-setup@v2
with:
version: 8.9.0

# Run version check
- run: pnpm check-version
shell: bash
4 changes: 0 additions & 4 deletions .github/actions/run-lint/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,3 @@ runs:
# Run eslint
- run: pnpm install --frozen-lockfile && pnpm lint
shell: bash

# Run version check
- run: pnpm check-version
shell: bash
20 changes: 20 additions & 0 deletions .github/workflows/run-check-version.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
env:
GIT_SHA: ${{ github.event.pull_request.head.sha || github.sha }}

name: "Check SDK versions match"
on:
pull_request:
branches: [main]
types: [labeled, opened, synchronize, reopened, auto_merge_enabled]
push:
branches:
- main

jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ env.GIT_SHA }}
- uses: ./.github/actions/run-check-version
Loading