Skip to content

Commit

Permalink
Merge pull request #182 from WyriHaximus/fix-sculping-messing-templat…
Browse files Browse the repository at this point in the history
…e-blocks-in-actions-post

Fix sculping messing template blocks in actions post
  • Loading branch information
WyriHaximus authored Mar 5, 2023
2 parents 45531f1 + c3a4b36 commit e956ec3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions source/_posts/2023-03-03-testing-github-actions.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ on:
pull_request:
jobs:
get-next-release-version:
name: Test Get Next Release version on ${{ matrix.os }}
name: Test Get Next Release version on {{ "${{" }} matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
runs-on: ${{ matrix.os }}
runs-on: {{ "${{" }} matrix.os }}
steps:
- uses: actions/checkout@v3
- name: 'Get Next Release version'
Expand All @@ -58,12 +58,12 @@ jobs:
uses: nick-fields/assert-action@v1
with:
expected: "666"
actual: ${{ steps.next-release-version.outputs.version }}
actual: {{ "${{" }} steps.next-release-version.outputs.version }}
- name: Assert R Version Output
uses: nick-fields/assert-action@v1
with:
expected: "r666"
actual: ${{ steps.next-release-version.outputs.r_version }}
actual: {{ "${{" }} steps.next-release-version.outputs.r_version }}
```
The top of the file is pretty standard, we only run it on the main branch or on pull requests.
Expand All @@ -84,15 +84,15 @@ box, we will not cancel any things of one of the fails and add that to the jobs
```yaml
jobs:
get-next-release-version:
name: Test Get Next Release version on ${{ matrix.os }}
name: Test Get Next Release version on {{ "${{" }} matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
runs-on: ${{ matrix.os }}
runs-on: {{ "${{" }} matrix.os }}
```
The steps is where it gets interesting, we first checkout the code, and then run the action by using a path reference
Expand All @@ -116,12 +116,12 @@ and `r_version` should be `r666`. To assert that we add two actions call to the
uses: nick-fields/assert-action@v1
with:
expected: "666"
actual: ${{ steps.next-release-version.outputs.version }}
actual: {{ "${{" }} steps.next-release-version.outputs.version }}
- name: Assert R Version Output
uses: nick-fields/assert-action@v1
with:
expected: "r666"
actual: ${{ steps.next-release-version.outputs.r_version }}
actual: {{ "${{" }} steps.next-release-version.outputs.r_version }}
```

Once the PR introducing this was merged in the next PR the new output method replaces the old one and these assertions
Expand Down

0 comments on commit e956ec3

Please sign in to comment.