check updated to nodejs20 detect-version and strings-replace #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "[A] strings/replace" | |
# The only reason this test exists is to check action actually works | |
# All complex logic checks are performed by JS unit tests | |
on: | |
push: | |
tags-ignore: [ '*' ] | |
branches: [ 'master' ] | |
paths: | |
- .github/workflows/act-strings-replace.yaml | |
workflow_dispatch: | |
jobs: | |
check-replacer-works: | |
runs-on: ubuntu-latest | |
steps: | |
- id: test | |
uses: milaboratory/github-ci/actions/strings/replace@v4-beta | |
with: | |
input: |- | |
line1 from1 | |
line2 from2 | |
rules: | | |
^from1 -> to1 | |
from2 -> to2 | |
- id: check | |
uses: milaboratory/github-ci/actions/action-test@v1 | |
env: | |
REPLACE_EXPECTED: |- | |
line1 from1 | |
line2 to2 | |
REPLACE_ACTUAL: ${{ steps.test.outputs.result }} | |
with: | |
test: | | |
test_equals "Replacer works" "${REPLACE_EXPECTED}" "${REPLACE_ACTUAL}" |