Skip to content

Commit

Permalink
Try short circuit
Browse files Browse the repository at this point in the history
  • Loading branch information
RobbieTheWagner committed Dec 6, 2024
1 parent 88df8a3 commit e74731a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 26 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/addon-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,30 @@ jobs:
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Check for tags and conditionally exit
- name: Check for tags and set short-circuit condition
id: check-tags
run: |
# Fetch tags pointing to the current commit
TAGS=$(git tag --points-at $GITHUB_SHA)
echo "Tags found: $TAGS"
# Check if a tag exists and if the ref is 'refs/heads/main' or 'refs/heads/master'
if [ -n "$TAGS" ] && ([[ "${GITHUB_REF}" == "refs/heads/main" ]] || [[ "${GITHUB_REF}" == "refs/heads/master" ]]); then
echo "Commit has a tag and is pushed to the main or master branch. Exiting."
exit 0
fi
echo "SHORT_CIRCUIT=true" >> $GITHUB_ENV
else
echo "SHORT_CIRCUIT=false" >> $GITHUB_ENV
- uses: pnpm/action-setup@v4
if: env.SHORT_CIRCUIT == 'false'
with:
version: 9
- uses: actions/setup-node@v4
if: env.SHORT_CIRCUIT == 'false'
with:
node-version: 18
cache: pnpm
- name: Install Dependencies
if: env.SHORT_CIRCUIT == 'false'
run: pnpm install --no-lockfile
- name: Deploy Docs
if: env.SHORT_CIRCUIT == 'false'
run: pnpm ember deploy production
17 changes: 0 additions & 17 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,3 @@
Deprecated as of 10.7.0. highlight(lang, code, ...args) has been deprecated.
Deprecated as of 10.7.0. Please use highlight(code, options) instead.
https://github.com/highlightjs/highlight.js/issues/2277














## v8.0.7 (2024-12-06)

## v8.0.6 (2024-12-06)
Expand Down
15 changes: 10 additions & 5 deletions tests/dummy/app/templates/docs/deploying.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,27 +112,32 @@ jobs:
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Check for tags and conditionally exit
- name: Check for tags and set short-circuit condition
id: check-tags
run: |
# Fetch tags pointing to the current commit
TAGS=$(git tag --points-at $GITHUB_SHA)
echo "Tags found: $TAGS"
# Check if a tag exists and if the ref is 'refs/heads/main' or 'refs/heads/master'
if [ -n "$TAGS" ] && ([[ "${GITHUB_REF}" == "refs/heads/main" ]] || [[ "${GITHUB_REF}" == "refs/heads/master" ]]); then
echo "Commit has a tag and is pushed to the main or master branch. Exiting."
exit 0
fi
echo "SHORT_CIRCUIT=true" >> $GITHUB_ENV
else
echo "SHORT_CIRCUIT=false" >> $GITHUB_ENV
- uses: pnpm/action-setup@v4
if: env.SHORT_CIRCUIT == 'false'
with:
version: 9
- uses: actions/setup-node@v4
if: env.SHORT_CIRCUIT == 'false'
with:
node-version: 18
cache: pnpm
- name: Install Dependencies
if: env.SHORT_CIRCUIT == 'false'
run: pnpm install --no-lockfile
- name: Deploy Docs
if: env.SHORT_CIRCUIT == 'false'
run: pnpm ember deploy production
```
Expand Down

0 comments on commit e74731a

Please sign in to comment.