Skip to content

Commit 1771089

Browse files
authored
Merge pull request #28 from chezmoi-sh/fix/ci-fails
:green_hearth:: Fix GitHub Actions workflows shellcheck issues
2 parents 48685d1 + 47229c5 commit 1771089

File tree

2 files changed

+23
-23
lines changed

2 files changed

+23
-23
lines changed

.github/workflows/push.release.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
run: |
4141
# Get current version
4242
CURRENT_VERSION=$(node -p "require('./package.json').version")
43-
echo "Current version: $CURRENT_VERSION"
43+
echo "Current version: ${CURRENT_VERSION}"
4444
4545
# Get previous version from the previous commit
4646
git checkout HEAD~1
@@ -50,17 +50,17 @@ jobs:
5050
PREVIOUS_VERSION="none"
5151
fi
5252
git checkout -
53-
echo "Previous version: $PREVIOUS_VERSION"
53+
echo "Previous version: ${PREVIOUS_VERSION}"
5454
5555
# Check if version has changed
56-
if [ "$CURRENT_VERSION" != "$PREVIOUS_VERSION" ]; then
57-
echo "Version has changed from $PREVIOUS_VERSION to $CURRENT_VERSION"
58-
echo "should_release=true" >> $GITHUB_OUTPUT
59-
echo "version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
56+
if [ "${CURRENT_VERSION}" != "${PREVIOUS_VERSION}" ]; then
57+
echo "Version has changed from ${PREVIOUS_VERSION} to ${CURRENT_VERSION}"
58+
echo "should_release=true" >> "${GITHUB_OUTPUT}"
59+
echo "version=${CURRENT_VERSION}" >> "${GITHUB_OUTPUT}"
6060
else
61-
echo "Version has not changed ($CURRENT_VERSION)"
62-
echo "should_release=false" >> $GITHUB_OUTPUT
63-
echo "version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
61+
echo "Version has not changed (${CURRENT_VERSION})"
62+
echo "should_release=false" >> "${GITHUB_OUTPUT}"
63+
echo "version=${CURRENT_VERSION}" >> "${GITHUB_OUTPUT}"
6464
fi
6565
6666
build:
@@ -89,13 +89,13 @@ jobs:
8989
- name: 📄 Create checksums
9090
run: |
9191
SHA256_FILE="extension_checksums.txt"
92-
sha256sum ./dist/extension.tar > ${SHA256_FILE}
92+
sha256sum ./dist/extension.tar > "${SHA256_FILE}"
9393
echo "Created checksum file: ${SHA256_FILE}"
94-
cat ${SHA256_FILE}
94+
cat "${SHA256_FILE}"
9595
9696
- name: 🚀 Create GitHub Release
9797
run: |
9898
VERSION="v${{ needs.check-version.outputs.version }}"
99-
gh release create ${VERSION} --draft --generate-notes ./dist/extension.tar ./extension_checksums.txt
99+
gh release create "${VERSION}" --draft --generate-notes ./dist/extension.tar ./extension_checksums.txt
100100
env:
101101
GH_TOKEN: ${{ github.token }}

.github/workflows/workflow_dispatch.version-bump.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,16 @@ jobs:
4949
id: auto-bump
5050
run: |
5151
npm version ${{ steps.nyx.outputs.version }} --no-git-tag-version
52-
echo "version=${{ steps.nyx.outputs.version }}" >> $GITHUB_OUTPUT
53-
echo "bump_type=${{ steps.nyx.outputs.bump }}" >> $GITHUB_OUTPUT
52+
echo "version=${{ steps.nyx.outputs.version }}" >> "${GITHUB_OUTPUT}"
53+
echo "bump_type=${{ steps.nyx.outputs.bump }}" >> "${GITHUB_OUTPUT}"
5454
5555
- name: 📝 Manual version bump
5656
if: github.event.inputs.version_type != 'auto'
5757
id: manual-bump
5858
run: |
5959
npm version ${{ github.event.inputs.version_type }} --no-git-tag-version
60-
echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
61-
echo "bump_type=${{ github.event.inputs.version_type }}" >> $GITHUB_OUTPUT
60+
echo "version=$(node -p "require('./package.json').version")" >> "${GITHUB_OUTPUT}"
61+
echo "bump_type=${{ github.event.inputs.version_type }}" >> "${GITHUB_OUTPUT}"
6262
6363
- name: 🔏 Create signed commit
6464
# Run if manual bump or if auto and new version was found
@@ -75,17 +75,17 @@ jobs:
7575
7676
# Create a new commit using GitHub API (GraphQL) to get signed commit
7777
gh api graphql \
78-
-f query='mutation($repo:String!,$branch:String!,$message:String!,$path:String!,$content:Base64String!,$oid:GitObjectID!){
78+
-f query="mutation(\$repo:String!,\$branch:String!,\$message:String!,\$path:String!,\$content:Base64String!,\$oid:GitObjectID!){
7979
createCommitOnBranch(input:{
80-
branch:{repositoryNameWithOwner:$repo,branchName:$branch},
81-
message:{headline:$message},
82-
fileChanges:{additions:[{path:$path,contents:$content}]},
83-
expectedHeadOid:$oid
80+
branch:{repositoryNameWithOwner:\$repo,branchName:\$branch},
81+
message:{headline:\$message},
82+
fileChanges:{additions:[{path:\$path,contents:\$content}]},
83+
expectedHeadOid:\$oid
8484
}){commit{url}}
85-
}' \
85+
}" \
8686
-f repo="${{ github.repository }}" \
8787
-f branch="main" \
88-
-f message="🚀: bump $BUMP_TYPE version to $VERSION" \
88+
-f message="🚀: bump ${BUMP_TYPE} version to ${VERSION}" \
8989
-f path="package.json" \
9090
-f content="$(base64 -w 0 package.json)" \
9191
-f oid="$(git rev-parse HEAD)"

0 commit comments

Comments
 (0)