Skip to content

Commit

Permalink
move check to labels
Browse files Browse the repository at this point in the history
  • Loading branch information
jprochazk committed Nov 4, 2024
1 parent 8c564dd commit b209e8a
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 39 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,42 @@ jobs:
mode: minimum
count: 1
labels: "📊 analytics, 🟦 blueprint, 🪳 bug, 🌊 C++ API, CLI, codegen/idl, 🧑‍💻 dev experience, dependencies, 📖 documentation, 💬 discussion, examples, exclude from changelog, 🪵 Log & send APIs, 📉 performance, 🐍 Python API, ⛃ re_datastore, 🔍 re_query, 📺 re_viewer, 🔺 re_renderer, 🚜 refactor, ⛴ release, 🦀 Rust API, 🔨 testing, ui, 🕸️ web"

wasm-bindgen-check:
name: Check wasm-bindgen version
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.34.0

- name: Get current wasm-bindgen version
id: current-version
run: |
version=$(pixi run taplo get -f crates/viewer/re_viewer/Cargo.toml "target.*.dependencies.wasm-bindgen")
echo "current_version=$version" >> $GITHUB_OUTPUT
- name: Get previous wasm-bindgen version
id: previous-version
run: |
prev_ref=$(git rev-parse --abbrev-ref HEAD)
git checkout main
version=$(pixi run taplo get -f crates/viewer/re_viewer/Cargo.toml "target.*.dependencies.wasm-bindgen")
echo "previous_version=$version" >> $GITHUB_OUTPUT
git checkout $prev_ref
- name: Require label if versions changed
if: ${{ steps.current-version.outputs.current_version != steps.previous-version.outputs.previous_version }}
uses: mheap/github-action-required-labels@v3
with:
mode: exactly
count: 1
labels: "wasm-bindgen version update"
39 changes: 0 additions & 39 deletions .github/workflows/reusable_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,42 +201,3 @@ jobs:
- name: Warn because of broken links
if: ${{ steps.lychee.outputs.exit_code != '0' }}
run: echo "::warning title="Link checker"::Link checker detected broken links!"

wasm-bindgen-check:
name: Check wasm-bindgen version
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.34.0

- name: Get current wasm-bindgen version
id: current-version
run: |
version=$(pixi run taplo get -f crates/viewer/re_viewer/Cargo.toml "target.*.dependencies.wasm-bindgen")
echo "current_version=$version" >> $GITHUB_OUTPUT
- name: Get previous wasm-bindgen version
id: previous-version
run: |
prev_ref=$(git rev-parse --abbrev-ref HEAD)
git checkout main
version=$(pixi run taplo get -f crates/viewer/re_viewer/Cargo.toml "target.*.dependencies.wasm-bindgen")
echo "previous_version=$version" >> $GITHUB_OUTPUT
git checkout $prev_ref
- name: Require label if versions changed
if: ${{ steps.current-version.outputs.current_version != steps.previous-version.outputs.previous_version }}
uses: mheap/github-action-required-labels@v3
with:
mode: exactly
count: 1
labels: "wasm-bindgen version update"

0 comments on commit b209e8a

Please sign in to comment.