Skip to content

Commit 483a202

Browse files
authored
Merge pull request #35 from Kurt-von-Laven/dont-quote->
fix: Don't quote the > operator in entrypoint.sh
2 parents 5d5be47 + 5d1b9cd commit 483a202

File tree

3 files changed

+19
-16
lines changed

3 files changed

+19
-16
lines changed

.github/workflows/bumpversion.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ jobs:
1717
- name: Create bump and changelog
1818
uses: commitizen-tools/commitizen-action@master
1919
with:
20-
github_token: ${{ secrets.GITHUB_TOKEN }}
20+
github_token: "${{ secrets.GITHUB_TOKEN }}"
2121
changelog_increment_filename: body.md
2222
- name: Release
2323
uses: softprops/action-gh-release@v1
2424
with:
2525
body_path: "body.md"
26-
tag_name: ${{ env.REVISION }}
26+
tag_name: "${{ env.REVISION }}"
2727
env:
28-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/test_action.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ jobs:
1010
steps:
1111
- uses: actions/checkout@v2
1212
with:
13-
ref: ${{github.event.pull_request.head.ref}}
14-
repository: ${{github.event.pull_request.head.repo.full_name}}
13+
ref: "${{ github.event.pull_request.head.ref }}"
14+
repository: "${{ github.event.pull_request.head.repo.full_name }}"
1515
fetch-depth: 0 # ensures that tags are fetched, seems to be needed
1616
- name: Capture commit id
1717
id: capture
1818
run: |
19-
COMMIT_ID=$(git rev-parse ${{ github.head_ref }})
19+
COMMIT_ID="$(git rev-parse "${{ github.head_ref }}")"
2020
echo "The sha of the starting commit is $COMMIT_ID"
2121
echo "::set-output name=commit::$COMMIT_ID"
2222
- name: create test commit
@@ -29,27 +29,27 @@ jobs:
2929
- name: test action
3030
uses: ./
3131
with:
32-
github_token: ${{ secrets.GITHUB_TOKEN }}
32+
github_token: "${{ secrets.GITHUB_TOKEN }}"
3333
commit: false
3434
push: false
3535
- uses: actions/checkout@v2
3636
with:
37-
ref: ${{github.event.pull_request.head.ref}}
38-
repository: ${{github.event.pull_request.head.repo.full_name}}
37+
ref: "${{ github.event.pull_request.head.ref }}"
38+
repository: "${{ github.event.pull_request.head.repo.full_name }}"
3939
fetch-depth: 0 # ensures that tags are fetched, seems to be needed
4040
path: new_head
4141
- name: Test push
4242
run: |
4343
cd new_head
44-
last_pushed_commit=$(git rev-parse ${{ github.head_ref }})
45-
echo "Commit sha on origin : $last_pushed_commit"
46-
if [[ $last_pushed_commit != ${{steps.capture.outputs.commit}} ]]; then
44+
last_pushed_commit="$(git rev-parse "${{ github.head_ref }}")"
45+
echo "Commit sha on origin: $last_pushed_commit"
46+
if [[ $last_pushed_commit != ${{ steps.capture.outputs.commit }} ]]; then
4747
echo "Something got pushed to ${{ github.head_ref }}"
4848
exit 1
4949
fi
5050
- name: Test commit
5151
run: |
52-
commit_message=$(git log -1 HEAD --pretty=format:%s)
52+
commit_message="$(git log -1 HEAD --pretty=format:%s)"
5353
echo "Latest commit: $commit_message"
5454
if [[ $commit_message != "feat: test feature" ]]; then
5555
echo "The latest commit message is not 'feat: test feature'"

entrypoint.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,13 @@ if [[ $INPUT_COMMIT == 'false' ]]; then
4444
CZ_CMD+=('--files-only')
4545
fi
4646
if [[ $INPUT_CHANGELOG_INCREMENT_FILENAME ]]; then
47-
CZ_CMD+=('--changelog-to-stdout' ">$INPUT_CHANGELOG_INCREMENT_FILENAME")
47+
CZ_CMD+=('--changelog-to-stdout')
48+
echo "${CZ_CMD[@]}" ">$INPUT_CHANGELOG_INCREMENT_FILENAME"
49+
"${CZ_CMD[@]}" >"$INPUT_CHANGELOG_INCREMENT_FILENAME"
50+
else
51+
echo "${CZ_CMD[@]}"
52+
"${CZ_CMD[@]}"
4853
fi
49-
echo "${CZ_CMD[@]}"
50-
"${CZ_CMD[@]}"
5154

5255
REV="$(cz version --project)"
5356
echo "REVISION=${REV}" >>"$GITHUB_ENV"

0 commit comments

Comments
 (0)