Skip to content

Commit

Permalink
Merge branch 'main' into restore-procedural-image-wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahs authored Apr 22, 2021
2 parents cd9985d + 7df8df4 commit 8ab292b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
38 changes: 19 additions & 19 deletions content/actions/reference/workflow-syntax-for-github-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ The following workflow will run on pushes to `releases/10` or `releases/beta/mon
on:
push:
branches:
- 'releases/**'
- '!releases/**-alpha'
- 'releases/**'
- '!releases/**-alpha'
```

### `on.<push|pull_request>.paths`
Expand All @@ -128,7 +128,7 @@ When all the path names match patterns in `paths-ignore`, the workflow will not
on:
push:
paths-ignore:
- 'docs/**'
- 'docs/**'
```

#### Example including paths
Expand All @@ -139,7 +139,7 @@ If at least one path matches a pattern in the `paths` filter, the workflow runs.
on:
push:
paths:
- '**.js'
- '**.js'
```

#### Excluding paths
Expand All @@ -160,8 +160,8 @@ This example runs anytime the `push` event includes a file in the `sub-project`
on:
push:
paths:
- 'sub-project/**'
- '!sub-project/docs/**'
- 'sub-project/**'
- '!sub-project/docs/**'
```

#### Git diff comparisons
Expand Down Expand Up @@ -478,15 +478,15 @@ jobs:
output1: ${{ steps.step1.outputs.test }}
output2: ${{ steps.step2.outputs.test }}
steps:
- id: step1
run: echo "::set-output name=test::hello"
- id: step2
run: echo "::set-output name=test::world"
- id: step1
run: echo "::set-output name=test::hello"
- id: step2
run: echo "::set-output name=test::world"
job2:
runs-on: ubuntu-latest
needs: job1
steps:
- run: echo ${{needs.job1.outputs.output1}} ${{needs.job1.outputs.output2}}
- run: echo ${{needs.job1.outputs.output1}} ${{needs.job1.outputs.output2}}
```
{% endraw %}

Expand Down Expand Up @@ -556,14 +556,14 @@ jobs:
name: My Job
runs-on: ubuntu-latest
steps:
- name: Print a greeting
env:
MY_VAR: Hi there! My name is
FIRST_NAME: Mona
MIDDLE_NAME: The
LAST_NAME: Octocat
run: |
echo $MY_VAR $FIRST_NAME $MIDDLE_NAME $LAST_NAME.
- name: Print a greeting
env:
MY_VAR: Hi there! My name is
FIRST_NAME: Mona
MIDDLE_NAME: The
LAST_NAME: Octocat
run: |
echo $MY_VAR $FIRST_NAME $MIDDLE_NAME $LAST_NAME.
```
{% endraw %}

Expand Down
6 changes: 3 additions & 3 deletions lib/liquid-tags/indented-data-reference.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
this.markup = tagToken.args.trim()
},

async render (context) {
async render (scope) {
// obfuscate first legit space, remove all other spaces, then restore legit space
// this way we can support spaces=NUMBER as well as spaces = NUMBER
const input = this.markup
Expand All @@ -30,7 +30,7 @@ module.exports = {
assert(parseInt(numSpaces) || numSpaces === '0', '"spaces=NUMBER" must include a number')

// Get the referenced value from the context
const value = await this.liquid.evalValue(`site.data.${dataReference}`, context)
const value = await this.liquid.evalValue(`site.data.${dataReference}`, scope)

// If nothing is found in the context, exit with nothing; this may
// feel weird and that we should throw an error, but this is "The Liquid Way TM"
Expand All @@ -39,6 +39,6 @@ module.exports = {
// add spaces to each line
const renderedReferenceWithIndent = value.replace(/^/mg, ' '.repeat(numSpaces))

return this.liquid.parseAndRender(renderedReferenceWithIndent, context)
return this.liquid.parseAndRender(renderedReferenceWithIndent, scope.environments)
}
}

0 comments on commit 8ab292b

Please sign in to comment.