Skip to content
Open
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
32 changes: 30 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ on:
- main
schedule:
- cron: '0 0 * * *'
workflow_dispatch: {}
workflow_dispatch:
inputs:
ember-source:
description: 'ember-source for the main channel: a full ember.js commit SHA or a tarball URL. Empty uses the latest build of main.'
required: false
type: string

jobs:
build:
Expand All @@ -26,6 +31,7 @@ jobs:
- release
- beta
- alpha
- main
all-deprecations:
- false
- true
Expand Down Expand Up @@ -69,7 +75,7 @@ jobs:
run: |
if [[ "$EMBER_RELEASE_CHANNEL" == "beta" ]]; then
pnpm install --save-dev ember-cli@beta @ember/app-blueprint@beta
elif [[ "$EMBER_RELEASE_CHANNEL" == "alpha" ]]; then
elif [[ "$EMBER_RELEASE_CHANNEL" == "alpha" || "$EMBER_RELEASE_CHANNEL" == "main" ]]; then
pnpm install --save-dev ember-cli@alpha @ember/app-blueprint@alpha
else
pnpm install --save-dev ember-cli@latest
Expand All @@ -78,6 +84,28 @@ jobs:
pnpm install
env:
EMBER_RELEASE_CHANNEL: ${{ matrix.channel }}
- name: Find the ember-source build of main
if: matrix.channel == 'main'
run: |
# ember.js CI uploads a build of every push to main
# to canary/shas/<sha>.tgz.
# canary.json points to the latest one.
if [[ "$EMBER_SOURCE_INPUT" =~ ^https?:// ]]; then
tarball="$EMBER_SOURCE_INPUT"
elif [[ "$EMBER_SOURCE_INPUT" =~ ^[0-9a-f]{40}$ ]]; then
tarball="https://s3.amazonaws.com/builds.emberjs.com/canary/shas/${EMBER_SOURCE_INPUT}.tgz"
elif [[ -z "$EMBER_SOURCE_INPUT" ]]; then
asset_path=$(curl --fail --silent --show-error https://s3.amazonaws.com/builds.emberjs.com/canary.json | jq --raw-output .assetPath)
tarball="https://s3.amazonaws.com/builds.emberjs.com${asset_path}"
else
echo "::error::The ember-source input must be a full commit SHA or a URL: $EMBER_SOURCE_INPUT"
exit 1
fi

curl --fail --silent --show-error --head "$tarball" > /dev/null
echo "EMBER_SOURCE_TARBALL=$tarball" >> "$GITHUB_ENV"
env:
EMBER_SOURCE_INPUT: ${{ inputs.ember-source }}
- name: Lint (markdown source)
run: pnpm lint:md:src
- name: Lint (typescript)
Expand Down
6 changes: 6 additions & 0 deletions src/markdown/tutorial/part-1/01-orientation.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ grep -q '_ALL_DEPRECATIONS_ENABLED: true,' config/environment.js

```

```run:command hidden=true cwd=super-rentals
# CI sets EMBER_SOURCE_TARBALL to test ember-source builds
# that are not on npm, for example the latest build of main.
if [ -n "$EMBER_SOURCE_TARBALL" ]; then pnpm i --save-dev "ember-source@$EMBER_SOURCE_TARBALL"; fi
```

```run:command hidden=true cwd=super-rentals
pnpm i --save-dev concurrently
git add package.json
Expand Down
Loading