Skip to content

Commit 7aaa8e0

Browse files
committed
chore: fix lint for qemu-image-build workflow
1 parent b40b06a commit 7aaa8e0

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

.github/actionlint.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
self-hosted-runner:
2+
labels:
3+
- arm-native-runner

.github/workflows/qemu-image-build.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
id: set-versions
3131
run: |
3232
VERSIONS=$(yq '.postgres_major[1]' ansible/vars.yml | jq -R -s -c 'split("\n")[:-1]')
33-
echo "postgres_versions=$VERSIONS" >> $GITHUB_OUTPUT
33+
echo "postgres_versions=$VERSIONS" >> "$GITHUB_OUTPUT"
3434
3535
check-existing-image:
3636
needs: prepare
@@ -48,12 +48,12 @@ jobs:
4848
REPOSITORY: postgres-vm-image
4949
run: |
5050
VERSION=$(yq '.postgres_release["postgres'${{ fromJson(needs.prepare.outputs.postgres_versions) }}'"]' ansible/vars.yml | tr -d '"')
51-
if aws ecr describe-images --repository-name $REPOSITORY --image-ids imageTag=$VERSION --region $AWS_REGION 2>/dev/null; then
51+
if aws ecr describe-images --repository-name "$REPOSITORY" --image-ids imageTag="$VERSION" --region "$AWS_REGION" 2>/dev/null; then
5252
echo "::notice title=Qemu image::Image with tag $VERSION already exists. Skipping build. Please update the version in ansible/vars.yml if you want to upload a new image."
53-
echo "image_exists=true" >> $GITHUB_OUTPUT
53+
echo "image_exists=true" >> "$GITHUB_OUTPUT"
5454
else
5555
echo "Image with tag $VERSION does not exist. Proceeding with build."
56-
echo "image_exists=false" >> $GITHUB_OUTPUT
56+
echo "image_exists=false" >> "$GITHUB_OUTPUT"
5757
fi
5858
5959
build:
@@ -91,16 +91,16 @@ jobs:
9191
9292
- name: Set PostgreSQL version environment variable
9393
run: |
94-
echo "POSTGRES_MAJOR_VERSION=${{ matrix.postgres_version }}" >> $GITHUB_ENV
95-
echo "EXECUTION_ID=${{ github.run_id }}-${{ matrix.postgres_version }}" >> $GITHUB_ENV
94+
echo "POSTGRES_MAJOR_VERSION=${{ matrix.postgres_version }}" >> "$GITHUB_ENV"
95+
echo "EXECUTION_ID=${{ github.run_id }}-${{ matrix.postgres_version }}" >> "$GITHUB_ENV"
9696
9797
- name: Generate common-nix.vars.pkr.hcl
9898
run: |
9999
curl -L https://github.com/mikefarah/yq/releases/download/v4.45.1/yq_linux_arm64 -o yq && chmod +x yq
100-
PG_VERSION=$(./yq '.postgres_release["postgres'${{ matrix.postgres_version }}'"]' ansible/vars.yml)
100+
PG_VERSION=$(./yq '.postgres_release["postgres${{ matrix.postgres_version }}"]' ansible/vars.yml)
101101
PG_VERSION=$(echo "$PG_VERSION" | tr -d '"') # Remove any surrounding quotes
102-
echo 'postgres-version = "'$PG_VERSION'"' > common-nix.vars.pkr.hcl
103-
echo 'postgres-major-version = "'$POSTGRES_MAJOR_VERSION'"' >> common-nix.vars.pkr.hcl
102+
echo "postgres-version = \"${PG_VERSION}\"" > common-nix.vars.pkr.hcl
103+
echo "postgres-major-version = \"${POSTGRES_MAJOR_VERSION}\"" >> common-nix.vars.pkr.hcl
104104
# Ensure there's a newline at the end of the file
105105
echo "" >> common-nix.vars.pkr.hcl
106106
@@ -121,8 +121,8 @@ jobs:
121121
- name: Grab release version
122122
id: process_release_version
123123
run: |
124-
VERSION=$(cat common-nix.vars.pkr.hcl | sed -e 's/postgres-version = "\(.*\)"/\1/g')
125-
echo "version=$VERSION" >> $GITHUB_OUTPUT
124+
VERSION=$(sed -e 's/postgres-version = "\(.*\)"/\1/g' common-nix.vars.pkr.hcl)
125+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
126126
127127
- name: configure aws credentials - staging
128128
uses: aws-actions/configure-aws-credentials@v4

0 commit comments

Comments
 (0)