Skip to content

fix: Don't quote the > operator in entrypoint.sh #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/bumpversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ jobs:
- name: Create bump and changelog
uses: commitizen-tools/commitizen-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_token: "${{ secrets.GITHUB_TOKEN }}"
changelog_increment_filename: body.md
- name: Release
uses: softprops/action-gh-release@v1
with:
body_path: "body.md"
tag_name: ${{ env.REVISION }}
tag_name: "${{ env.REVISION }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
20 changes: 10 additions & 10 deletions .github/workflows/test_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
ref: "${{ github.event.pull_request.head.ref }}"
repository: "${{ github.event.pull_request.head.repo.full_name }}"
fetch-depth: 0 # ensures that tags are fetched, seems to be needed
- name: Capture commit id
id: capture
run: |
COMMIT_ID=$(git rev-parse ${{ github.head_ref }})
COMMIT_ID="$(git rev-parse "${{ github.head_ref }}")"
echo "The sha of the starting commit is $COMMIT_ID"
echo "::set-output name=commit::$COMMIT_ID"
- name: create test commit
Expand All @@ -29,27 +29,27 @@ jobs:
- name: test action
uses: ./
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_token: "${{ secrets.GITHUB_TOKEN }}"
commit: false
push: false
- uses: actions/checkout@v2
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
ref: "${{ github.event.pull_request.head.ref }}"
repository: "${{ github.event.pull_request.head.repo.full_name }}"
fetch-depth: 0 # ensures that tags are fetched, seems to be needed
path: new_head
- name: Test push
run: |
cd new_head
last_pushed_commit=$(git rev-parse ${{ github.head_ref }})
echo "Commit sha on origin : $last_pushed_commit"
if [[ $last_pushed_commit != ${{steps.capture.outputs.commit}} ]]; then
last_pushed_commit="$(git rev-parse "${{ github.head_ref }}")"
echo "Commit sha on origin: $last_pushed_commit"
if [[ $last_pushed_commit != ${{ steps.capture.outputs.commit }} ]]; then
echo "Something got pushed to ${{ github.head_ref }}"
exit 1
fi
- name: Test commit
run: |
commit_message=$(git log -1 HEAD --pretty=format:%s)
commit_message="$(git log -1 HEAD --pretty=format:%s)"
echo "Latest commit: $commit_message"
if [[ $commit_message != "feat: test feature" ]]; then
echo "The latest commit message is not 'feat: test feature'"
Expand Down
9 changes: 6 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,13 @@ if [[ $INPUT_COMMIT == 'false' ]]; then
CZ_CMD+=('--files-only')
fi
if [[ $INPUT_CHANGELOG_INCREMENT_FILENAME ]]; then
CZ_CMD+=('--changelog-to-stdout' ">$INPUT_CHANGELOG_INCREMENT_FILENAME")
CZ_CMD+=('--changelog-to-stdout')
echo "${CZ_CMD[@]}" ">$INPUT_CHANGELOG_INCREMENT_FILENAME"
"${CZ_CMD[@]}" >"$INPUT_CHANGELOG_INCREMENT_FILENAME"
else
echo "${CZ_CMD[@]}"
"${CZ_CMD[@]}"
fi
echo "${CZ_CMD[@]}"
"${CZ_CMD[@]}"

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