🤖 Fix: mergeabot #53
Workflow file for this run
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: CI | |
on: | |
pull_request: | |
push: | |
branches: main | |
jobs: | |
action: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- id: tag | |
uses: ./ | |
with: | |
package-yaml: test/package.yaml | |
tag-prefix: example- | |
- id: expected | |
run: | | |
# Naive parse on our controlled test file | |
version=$(sed -E '/^version: (.*)$/!d; s//\1/' test/package.yaml) | |
cat >> "$GITHUB_OUTPUT" <<EOM | |
version=$version | |
tag=example-$version | |
EOM | |
- name: Assertions on outputs.version | |
run: | | |
if [[ "${{ steps.tag.outputs.version }}" != "${{ steps.expected.outputs.version }}" ]]; then | |
echo "Version did not parse correctly" >&2 | |
exit 1 | |
fi | |
- if: ${{ steps.tag.outputs.tag }} | |
name: Assertions on outputs.tag | |
run: | | |
if [[ "${{ steps.tag.outputs.tag }}" != "${{ steps.expected.outputs.tag }}" ]]; then | |
echo "Tag was not prefixed correctly" >&2 | |
exit 1 | |
fi | |
# If we created a tag, run again to verify the already-exists logic | |
- if: ${{ steps.tag.outputs.tag }} | |
uses: ./ | |
with: | |
package-yaml: test/package.yaml | |
tag-prefix: example- |