Skip to content

Commit dc27ba1

Browse files
chore: convention: bash variable names are lowercase
1 parent 63589a8 commit dc27ba1

File tree

5 files changed

+32
-32
lines changed

5 files changed

+32
-32
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ jobs:
4343
shell: bash
4444
id: determine
4545
run: |
46-
HAS_CONTAINER="${{ vars.HAS_CONTAINER }}"
47-
echo "has_container=${HAS_CONTAINER:-false}" >> ${GITHUB_OUTPUT}
46+
has_container="${{ vars.HAS_CONTAINER }}"
47+
echo "has_container=${has_container:-false}" >> ${GITHUB_OUTPUT}
4848
4949
changes:
5050
name: Detect changes
@@ -143,18 +143,18 @@ jobs:
143143
shell: bash
144144
id: version
145145
run: |
146-
VERSION="$(cog bump --auto --dry-run || true)"
146+
version="$(cog bump --auto --dry-run || true)"
147147
148-
if [[ "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
149-
echo "New version: ${VERSION}"
148+
if [[ "$version" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
149+
echo "New version: ${version}"
150150
else
151-
VERSION="v$(cog -v get-version)"
151+
version="v$(cog -v get-version)"
152152
153-
echo "No version generated, defaulting to latest tag: ${VERSION}"
153+
echo "No version generated, defaulting to latest tag: ${version}"
154154
fi
155155
156156
# remove v
157-
VERSION="${VERSION//v/}"
157+
version="${version//v/}"
158158
159159
# store
160160
echo "version=${VERSION}" >> ${GITHUB_OUTPUT}
@@ -522,8 +522,8 @@ jobs:
522522
- name: Set Docker tag
523523
shell: bash
524524
run: |
525-
UNIQUE_TAG=pr-${{ github.event.pull_request.base.sha }}-${{ github.event.pull_request.head.sha }}
526-
echo "UNIQUE_TAG=${UNIQUE_TAG##*/}" >> ${GITHUB_ENV}
525+
unique_tag=pr-${{ github.event.pull_request.base.sha }}-${{ github.event.pull_request.head.sha }}
526+
echo "UNIQUE_TAG=${unique_tag##*/}" >> ${GITHUB_ENV}
527527
528528
# Extract metadata (tags, labels) for Docker
529529
# https://github.com/docker/metadata-action
@@ -548,8 +548,8 @@ jobs:
548548
- name: Set application name
549549
shell: bash
550550
run: |
551-
APPLICATION_NAME=${{ github.repository }}
552-
echo "APPLICATION_NAME=${APPLICATION_NAME##*/}" >> ${GITHUB_ENV}
551+
application_name=${{ github.repository }}
552+
echo "APPLICATION_NAME=${application_name##*/}" >> ${GITHUB_ENV}
553553
554554
- name: Build Docker image
555555
uses: docker/build-push-action@1dc73863535b631f98b2378be8619f83b136f4a0 # v6.17.0
@@ -614,14 +614,14 @@ jobs:
614614
- name: Set application name
615615
shell: bash
616616
run: |
617-
APPLICATION_NAME=${{ github.repository }}
618-
echo "APPLICATION_NAME=${APPLICATION_NAME##*/}" >> ${GITHUB_ENV}
617+
application_name=${{ github.repository }}
618+
echo "APPLICATION_NAME=${application_name##*/}" >> ${GITHUB_ENV}
619619
620620
- name: Set Docker tag (which is also the filename.tar)
621621
shell: bash
622622
run: |
623-
UNIQUE_TAG=pr-${{ github.event.pull_request.base.sha }}-${{ github.event.pull_request.head.sha }}
624-
echo "UNIQUE_TAG=${UNIQUE_TAG##*/}" >> ${GITHUB_ENV}
623+
unique_tag=pr-${{ github.event.pull_request.base.sha }}-${{ github.event.pull_request.head.sha }}
624+
echo "UNIQUE_TAG=${unique_tag##*/}" >> ${GITHUB_ENV}
625625
626626
- name: Extract Docker metadata
627627
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0

.github/workflows/publish-crate-after-release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ jobs:
2626
id: determine
2727
shell: bash
2828
run: |
29-
HAS_CRATE="${{ vars.HAS_CRATE }}"
30-
echo "has_crate=${HAS_CRATE:-false}" >> ${GITHUB_OUTPUT}
29+
has_crate="${{ vars.HAS_CRATE }}"
30+
echo "has_crate=${has_crate:-false}" >> ${GITHUB_OUTPUT}
3131
3232
publish-crate:
3333
name: Publish crate
@@ -81,12 +81,12 @@ jobs:
8181
shell: bash
8282
id: version
8383
run: |
84-
VERSION="${{ github.ref_name }}"
84+
version="${{ github.ref_name }}"
8585
# remove v
86-
VERSION="${VERSION//v/}"
86+
version="${version//v/}"
8787
8888
# store
89-
cargo set-version ${VERSION}
89+
cargo set-version ${version}
9090
9191
# debug
9292
cat Cargo.toml

.github/workflows/retag-containers-after-push.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ jobs:
4343
id: determine
4444
shell: bash
4545
run: |
46-
HAS_CONTAINER="${{ vars.HAS_CONTAINER }}"
47-
echo "has_container=${HAS_CONTAINER:-false}" >> ${GITHUB_OUTPUT}
46+
has_container="${{ vars.HAS_CONTAINER }}"
47+
echo "has_container=${has_container:-false}" >> ${GITHUB_OUTPUT}
4848
4949
retag-containers:
5050
name: Retag the containers
@@ -67,12 +67,12 @@ jobs:
6767
# a commit always has a parent, but if it has 2, the commit is a merge
6868
# so lets see if we have one
6969
# since we're listening to the push event we have to do this manually
70-
PARENT2=$(git rev-parse "HEAD^2" --quiet 2>/dev/null) || EXIT_CODE=$?
70+
parent2=$(git rev-parse "HEAD^2" --quiet 2>/dev/null) || EXIT_CODE=$?
7171
7272
if [ ${EXIT_CODE} -eq 0 ]
7373
then
74-
echo "The head of the incoming PR is ${PARENT2}"
75-
echo "INCOMING_PR_HEAD_COMMIT=${PARENT2}" >> ${GITHUB_ENV}
74+
echo "The head of the incoming PR is ${parent2}"
75+
echo "INCOMING_PR_HEAD_COMMIT=${parent2}" >> ${GITHUB_ENV}
7676
7777
else
7878
echo "The incoming push isn't a merge, ergo it's not a PR"

.github/workflows/retag-containers-after-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ jobs:
3131
id: determine
3232
shell: bash
3333
run: |
34-
HAS_CONTAINER="${{ vars.HAS_CONTAINER }}"
35-
echo "has_container=${HAS_CONTAINER:-false}" >> ${GITHUB_OUTPUT}
34+
has_container="${{ vars.HAS_CONTAINER }}"
35+
echo "has_container=${has_container:-false}" >> ${GITHUB_OUTPUT}
3636
3737
retag-containers:
3838
name: Retag the containers

.github/workflows/test-release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,12 @@ jobs:
9595
9696
cog bump --auto
9797
98-
VERSION="v$(cog -v get-version)"
99-
echo "version=$VERSION" >> $GITHUB_OUTPUT
98+
version="v$(cog -v get-version)"
99+
echo "version=${version}" >> ${GITHUB_OUTPUT}
100100
101-
cog changelog --at ${VERSION} > GITHUB_CHANGELOG.md
101+
cog changelog --at ${version} > GITHUB_CHANGELOG.md
102102
103-
echo "New version: ${VERSION}"
103+
echo "New version: ${version}"
104104
105105
echo "Changelog: "
106106

0 commit comments

Comments
 (0)