Skip to content

Commit

Permalink
wip(build): branch -> ref
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoMcA committed Jan 10, 2025
1 parent 6b1f820 commit 71dbeeb
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ env:
on:
workflow_dispatch:
inputs:
rari-branch:
description: "rari branch to build (leave blank for npm release)"
rari-ref:
description: "rari ref to build (leave blank for npm release)"
type: string
default: ""

content-branch:
description: "content branch to build"
content-ref:
description: "content ref to build"
type: string
default: "main"

Expand Down Expand Up @@ -49,8 +49,8 @@ jobs:
steps:
- name: Print information about build
run: |
echo "rari-branch: ${{ github.event.inputs.rari-branch }}"
echo "content-branch: ${{ github.event.inputs.content-branch }}"
echo "rari-ref: ${{ github.event.inputs.rari-ref }}"
echo "content-ref: ${{ github.event.inputs.content-ref }}"
echo "notes: ${{ github.event.inputs.notes || env.DEFAULT_NOTES }}"
echo "invalidate: ${{ github.event.inputs.invalidate }}"
Expand All @@ -66,7 +66,7 @@ jobs:
# but for now it's good enough. We'll need all the history
# so we can figure out each document's last-modified date.
fetch-depth: 0
ref: ${{ github.event.inputs.content-branch }}
ref: ${{ github.event.inputs.content-ref }}

- uses: actions/checkout@v4
if: ${{ ! vars.SKIP_BUILD }}
Expand Down Expand Up @@ -127,7 +127,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: ${{ github.event.inputs.rari-branch == '' && 'yarn' || '' }}
cache: ${{ github.event.inputs.rari-ref == '' && 'yarn' || '' }}

- name: Install all yarn packages
if: ${{ ! vars.SKIP_BUILD }}
Expand All @@ -138,14 +138,14 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/checkout@v4
if: ${{ ! vars.SKIP_BUILD && github.event.inputs.rari-branch != '' }}
if: ${{ ! vars.SKIP_BUILD && github.event.inputs.rari-ref != '' }}
with:
repository: mdn/rari
path: mdn/rari
ref: ${{ github.event.inputs.rari-branch }}
ref: ${{ github.event.inputs.rari-ref }}

- name: Cache Cargo registry
if: ${{ ! vars.SKIP_BUILD && github.event.inputs.rari-branch != '' }}
if: ${{ ! vars.SKIP_BUILD && github.event.inputs.rari-ref != '' }}
uses: actions/cache@v4
with:
path: |
Expand All @@ -155,14 +155,14 @@ jobs:
restore-keys: ${{ runner.os }}-cargo-

- uses: dtolnay/rust-toolchain@stable
if: ${{ ! vars.SKIP_BUILD && github.event.inputs.rari-branch != '' }}
if: ${{ ! vars.SKIP_BUILD && github.event.inputs.rari-ref != '' }}

- name: sccache-cache
if: ${{ ! vars.SKIP_BUILD && github.event.inputs.rari-branch != '' }}
if: ${{ ! vars.SKIP_BUILD && github.event.inputs.rari-ref != '' }}
uses: mozilla-actions/[email protected]

- name: Build rari
if: ${{ ! vars.SKIP_BUILD && github.event.inputs.rari-branch != '' }}
if: ${{ ! vars.SKIP_BUILD && github.event.inputs.rari-ref != '' }}
run: |
cd mdn/rari
cargo build --release
Expand Down

0 comments on commit 71dbeeb

Please sign in to comment.