Skip to content

Commit ba8dac1

Browse files
actionlint work
Signed-off-by: greg pereira <[email protected]>
1 parent 6138195 commit ba8dac1

File tree

2 files changed

+78
-78
lines changed

2 files changed

+78
-78
lines changed

.github/workflows/pr-images.yml

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ on:
77

88
env:
99
GHCR_REGISTRY: ghcr.io
10-
GHCR_UI_IMAGE_NAME: ${{ github.repository }}/ui
10+
GHCR_UI_IMAGE_NAME: "${{ github.repository }}/ui"
1111
QUAY_REGISTRY: quay.io
1212
QUAY_UI_IMAGE_NAME: instructlab-ui/ui
13-
GHCR_PS_IMAGE_NAME: ${{ github.repository }}/pathservice
13+
GHCR_PS_IMAGE_NAME: "${{ github.repository }}/pathservice"
1414
QUAY_PS_IMAGE_NAME: instructlab-ui/pathservice
1515

1616
jobs:
@@ -30,7 +30,7 @@ jobs:
3030

3131
- name: Skip if triggered by GitHub Actions bot
3232
id: check-skip
33-
run: |
33+
run: |-
3434
if [[ "$(git log -1 --pretty=format:'%s')" == *"[CI AUTOMATION]:"* ]]; then
3535
echo "Workflow triggered by previous action commit. Skipping."
3636
exit 1
@@ -40,16 +40,16 @@ jobs:
4040
- name: Log in to the GHCR container image registry
4141
uses: docker/login-action@v3
4242
with:
43-
registry: ${{ env.GHCR_REGISTRY }}
44-
username: ${{ github.actor }}
45-
password: ${{ secrets.GITHUB_TOKEN }}
43+
registry: "${{ env.GHCR_REGISTRY }}"
44+
username: "${{ github.actor }}"
45+
password: "${{ secrets.GITHUB_TOKEN }}"
4646

4747
- name: Log in to the Quay container image registry
4848
uses: docker/login-action@v3
4949
with:
50-
registry: ${{ env.QUAY_REGISTRY }}
51-
username: ${{ secrets.QUAY_USERNAME }}
52-
password: ${{ secrets.QUAY_TOKEN }}
50+
registry: "${{ env.QUAY_REGISTRY }}"
51+
username: "${{ secrets.QUAY_USERNAME }}"
52+
password: "${{ secrets.QUAY_TOKEN }}"
5353

5454
- name: Set up Docker Buildx
5555
uses: docker/setup-buildx-action@v3
@@ -58,13 +58,13 @@ jobs:
5858
uses: actions/cache@v4
5959
with:
6060
path: /tmp/.buildx-cache
61-
key: ${{ runner.os }}-buildx-${{ github.sha }}
61+
key: "${{ runner.os }}-buildx-${{ github.sha }}"
6262
restore-keys: |
63-
${{ runner.os }}-buildx-
63+
"${{ runner.os }}-buildx-"
6464
6565
- name: Get Pull Request Number from Commit
6666
id: get_pr_number
67-
uses: actions/github-script@v6
67+
uses: actions/github-script@v7
6868
with:
6969
script: |
7070
console.log("Repository owner:", context.repo.owner);
@@ -99,13 +99,13 @@ jobs:
9999

100100
- name: Combine GHCR Tags with PR Tag
101101
id: combined_ghcr_ui_tags
102-
if: ${{ steps.get_pr_number.outputs.result }} != ""
103-
run: |
102+
if: ${{ steps.get_pr_number.outputs.result != '' }}
103+
run: |-
104104
TAGS="${{ steps.ghcr_ui_meta.outputs.tags }}"
105105
PR_TAG="pr-${{ steps.get_pr_number.outputs.result }}"
106106
COMBINED_TAGS="${PR_TAG},${TAGS}"
107-
echo "COMBINED_TAGS=$COMBINED_TAGS" >> $GITHUB_ENV
108-
echo "PR_TAG=$PR_TAG" >> $GITHUB_ENV
107+
echo "COMBINED_TAGS=${COMBINED_TAGS}" >> "$GITHUB_ENV"
108+
echo "PR_TAG=${PR_TAG}" >> "$GITHUB_ENV"
109109
110110
- name: Extract Quay metadata (tags, labels) for UI image
111111
id: quay_ui_meta
@@ -115,13 +115,13 @@ jobs:
115115

116116
- name: Combine Quay Tags with PR Tag
117117
id: combined_quay_ui_tags
118-
if: ${{ steps.get_pr_number.outputs.result }} != ""
119-
run: |
118+
if: ${{ steps.get_pr_number.outputs.result != '' }}
119+
run: |-
120120
TAGS="${{ steps.quay_ui_meta.outputs.tags }}"
121121
PR_TAG="pr-${{ steps.get_pr_number.outputs.result }}"
122122
COMBINED_TAGS="${PR_TAG},${TAGS}"
123-
echo "COMBINED_TAGS=$COMBINED_TAGS" >> $GITHUB_ENV
124-
echo "PR_TAG=$PR_TAG" >> $GITHUB_ENV
123+
echo "COMBINED_TAGS=${COMBINED_TAGS}" >> "$GITHUB_ENV"
124+
echo "PR_TAG=${PR_TAG}" >> "$GITHUB_ENV"
125125
126126
- name: Build and push ui image to ghcr.io
127127
id: push-ui-ghcr
@@ -167,15 +167,15 @@ jobs:
167167
id: update_qa_ui_manifest_image
168168
env:
169169
PR_TAG: ${{ steps.combined_quay_ui_tags.outputs.PR_TAG }}
170-
run: |
170+
run: |-
171171
sudo wget https://github.com/mikefarah/yq/releases/download/v4.34.1/yq_linux_amd64 -O /usr/local/bin/yq
172172
sudo chmod +x /usr/local/bin/yq
173-
PR_TAG="${PR_TAG}" yq -i '
174-
(.images[] | select(.name == "quay.io/instructlab-ui/ui") | .newTag) = '$PR_TAG'
173+
yq -i '
174+
(.images[] | select(.name == "quay.io/instructlab-ui/ui") | .newTag) = env(PR_TAG)
175175
' deploy/k8s/overlays/openshift/qa/kustomization.yaml
176176
177177
- name: Commit and push bump QA UI Image manifest
178-
run: |
178+
run: |-
179179
git config --global user.name "${GITHUB_ACTOR}"
180180
git config --global user.email "${GITHUB_ACTOR}@users.noreply.${INPUT_ORGANIZATION_DOMAIN}"
181181
git add deploy/k8s/overlays/openshift/qa/kustomization.yaml
@@ -198,7 +198,7 @@ jobs:
198198

199199
- name: Skip if triggered by GitHub Actions bot
200200
id: check-skip
201-
run: |
201+
run: |-
202202
if [[ "$(git log -1 --pretty=format:'%s')" == *"[CI AUTOMATION]:"* ]]; then
203203
echo "Workflow triggered by previous action commit. Skipping."
204204
exit 1
@@ -232,7 +232,7 @@ jobs:
232232
233233
- name: Get Pull Request Number from Commit
234234
id: get_pr_number
235-
uses: actions/github-script@v6
235+
uses: actions/github-script@v7
236236
with:
237237
script: |
238238
console.log("Repository owner:", context.repo.owner);
@@ -267,13 +267,13 @@ jobs:
267267

268268
- name: Combine GHCR Tags with PR Tag
269269
id: combined_ghcr_ps_tags
270-
if: ${{ steps.get_pr_number.outputs.result }} != ""
271-
run: |
270+
if: ${{ steps.get_pr_number.outputs.result != '' }}
271+
run: |-
272272
TAGS="${{ steps.ghcr_ps_meta.outputs.tags }}"
273273
PR_TAG="pr-${{ steps.get_pr_number.outputs.result }}"
274274
COMBINED_TAGS="${PR_TAG},${TAGS}"
275-
echo "COMBINED_TAGS=$COMBINED_TAGS" >> $GITHUB_ENV
276-
echo "PR_TAG=$PR_TAG" >> $GITHUB_ENV
275+
echo "COMBINED_TAGS=${COMBINED_TAGS}" >> "$GITHUB_ENV"
276+
echo "PR_TAG=${PR_TAG}" >> "$GITHUB_ENV"
277277
278278
- name: Extract metadata (tags, labels) for pathservice image
279279
id: quay_ps_meta
@@ -283,13 +283,13 @@ jobs:
283283

284284
- name: Combine GHCR Tags with PR Tag
285285
id: combined_quay_ps_tags
286-
if: ${{ steps.get_pr_number.outputs.result }} != ""
287-
run: |
286+
if: ${{ steps.get_pr_number.outputs.result != '' }}
287+
run: |-
288288
TAGS="${{ steps.quay_ps_meta.outputs.tags }}"
289289
PR_TAG="pr-${{ steps.get_pr_number.outputs.result }}"
290290
COMBINED_TAGS="${PR_TAG},${TAGS}"
291-
echo "COMBINED_TAGS=$COMBINED_TAGS" >> $GITHUB_ENV
292-
echo "PR_TAG=$PR_TAG" >> $GITHUB_ENV
291+
echo "COMBINED_TAGS=${COMBINED_TAGS}" >> "$GITHUB_ENV"
292+
echo "PR_TAG=${PR_TAG}" >> "$GITHUB_ENV"
293293
294294
- name: Build and push QA PS image to ghcr.io
295295
id: push-ps-ghcr
@@ -335,15 +335,15 @@ jobs:
335335
id: update_qa_ps_manifest_image
336336
env:
337337
PR_TAG: ${{ steps.combined_quay_ps_tags.outputs.PR_TAG }}
338-
run: |
338+
run: |-
339339
sudo wget https://github.com/mikefarah/yq/releases/download/v4.34.1/yq_linux_amd64 -O /usr/local/bin/yq
340340
sudo chmod +x /usr/local/bin/yq
341-
PR_TAG="${PR_TAG}" yq -i '
342-
(.images[] | select(.name == "quay.io/instructlab-ui/pathservice") | .newTag) = '$PR_TAG'
341+
yq -i '
342+
(.images[] | select(.name == "quay.io/instructlab-ui/ui") | .newTag) = env(PR_TAG)
343343
' deploy/k8s/overlays/openshift/qa/kustomization.yaml
344344
345345
- name: Commit and push bump QA PS Image manifest
346-
run: |
346+
run: |-
347347
git config --global user.name "${GITHUB_ACTOR}"
348348
git config --global user.email "${GITHUB_ACTOR}@users.noreply.${INPUT_ORGANIZATION_DOMAIN}"
349349
git add deploy/k8s/overlays/openshift/qa/kustomization.yaml

.github/workflows/release-images.yml

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ on:
55

66
env:
77
GHCR_REGISTRY: ghcr.io
8-
GHCR_UI_IMAGE_NAME: ${{ github.repository }}/ui
8+
GHCR_UI_IMAGE_NAME: "${{ github.repository }}/ui"
99
QUAY_REGISTRY: quay.io
1010
QUAY_UI_IMAGE_NAME: instructlab-ui/ui
11-
GHCR_PS_IMAGE_NAME: ${{ github.repository }}/pathservice
11+
GHCR_PS_IMAGE_NAME: "${{ github.repository }}/pathservice"
1212
QUAY_PS_IMAGE_NAME: instructlab-ui/pathservice
1313

1414
jobs:
@@ -29,16 +29,16 @@ jobs:
2929
- name: Log in to the GHCR container image registry
3030
uses: docker/login-action@v3
3131
with:
32-
registry: ${{ env.GHCR_REGISTRY }}
33-
username: ${{ github.actor }}
34-
password: ${{ secrets.GITHUB_TOKEN }}
32+
registry: "${{ env.GHCR_REGISTRY }}"
33+
username: "${{ github.actor }}"
34+
password: "${{ secrets.GITHUB_TOKEN }}"
3535

3636
- name: Log in to the Quay container image registry
3737
uses: docker/login-action@v3
3838
with:
39-
registry: ${{ env.QUAY_REGISTRY }}
40-
username: ${{ secrets.QUAY_USERNAME }}
41-
password: ${{ secrets.QUAY_TOKEN }}
39+
registry: "${{ env.QUAY_REGISTRY }}"
40+
username: "${{ secrets.QUAY_USERNAME }}"
41+
password: "${{ secrets.QUAY_TOKEN }}"
4242

4343
- name: Set up Docker Buildx
4444
uses: docker/setup-buildx-action@v3
@@ -47,31 +47,31 @@ jobs:
4747
uses: actions/cache@v4
4848
with:
4949
path: /tmp/.buildx-cache
50-
key: ${{ runner.os }}-buildx-${{ github.sha }}
51-
restore-keys: |
52-
${{ runner.os }}-buildx-
50+
key: "${{ runner.os }}-buildx-${{ github.sha }}"
51+
restore-keys: |-
52+
"${{ runner.os }}-buildx-"
5353
5454
- name: Extract Release Tag
5555
id: get_release_tag
56-
run: |
56+
run: |-
5757
RELEASE_TAG="release-${{ github.event.release.tag_name }}"
58-
echo "RELEASE_TAG=$RELEASE_TAG" >> $GITHUB_ENV
58+
echo "RELEASE_TAG=${RELEASE_TAG}" >> "$GITHUB_ENV"
5959
6060
- name: Extract metadata (tags, labels) for UI image
6161
id: ghcr_ui_meta
6262
uses: docker/metadata-action@v5
6363
with:
64-
images: ${{ env.GHCR_REGISTRY }}/${{ env.GHCR_UI_IMAGE_NAME }}
64+
images: "${{ env.GHCR_REGISTRY }}/${{ env.GHCR_UI_IMAGE_NAME }}"
6565

6666
- name: Combine GHCR Tags with PR Tag
6767
id: combined_ghcr_ui_tags
68-
if: ${{ steps.get_release_tag.outputs.result }} != ""
69-
run: |
68+
if: ${{steps.get_release_tag.outputs.result != '' }}
69+
run: |-
7070
TAGS="${{ steps.ghcr_ui_meta.outputs.tags }}"
7171
RELEASE_TAG="release-${{ steps.get_release_tag.outputs.RELEASE_TAG }}"
7272
COMBINED_TAGS="${RELEASE_TAG},${TAGS}"
73-
echo "COMBINED_TAGS=$COMBINED_TAGS" >> $GITHUB_ENV
74-
echo "RELEASE_TAG=$RELEASE_TAG" >> $GITHUB_ENV
73+
echo "COMBINED_TAGS=${COMBINED_TAGS}" >> "$GITHUB_ENV"
74+
echo "RELEASE_TAG=${RELEASE_TAG}" >> "$GITHUB_ENV"
7575
7676
- name: Extract metadata (tags, labels) for UI image
7777
id: quay_ui_meta
@@ -81,13 +81,13 @@ jobs:
8181

8282
- name: Combine Quay Tags with PR Tag
8383
id: combined_quay_ui_tags
84-
if: ${{ steps.get_release_tag.outputs.result }} != ""
85-
run: |
84+
if: ${{ steps.get_release_tag.outputs.result != '' }}
85+
run: |-
8686
TAGS="${{ steps.quay_ui_meta.outputs.tags }}"
8787
RELEASE_TAG="release-${{ steps.get_release_tag.outputs.result }}"
8888
COMBINED_TAGS="${RELEASE_TAG},${TAGS}"
89-
echo "COMBINED_TAGS=$COMBINED_TAGS" >> $GITHUB_ENV
90-
echo "RELEASE_TAG=$RELEASE_TAG" >> $GITHUB_ENV
89+
echo "COMBINED_TAGS=${COMBINED_TAGS}" >> "$GITHUB_ENV"
90+
echo "RELEASE_TAG=${RELEASE_TAG}" >> "$GITHUB_ENV"
9191
9292
- name: Build and push ui image to ghcr.io
9393
id: push-ui-ghcr
@@ -133,15 +133,15 @@ jobs:
133133
id: update_prod_ui_manifest_image
134134
env:
135135
RELEASE_TAG: ${{ steps.combined_quay_ui_tags.outputs.RELEASE_TAG }}
136-
run: |
136+
run: |-
137137
sudo wget https://github.com/mikefarah/yq/releases/download/v4.34.1/yq_linux_amd64 -O /usr/local/bin/yq
138138
sudo chmod +x /usr/local/bin/yq
139-
RELEASE_TAG="${RELEASE_TAG}" yq -i '
140-
(.images[] | select(.name == "quay.io/instructlab-ui/ui") | .newTag) = '$RELEASE_TAG'
139+
yq -i '
140+
(.images[] | select(.name == "quay.io/instructlab-ui/ui") | .newTag) = env(RELEASE_TAG)
141141
' deploy/k8s/overlays/openshift/prod/kustomization.yaml
142142
143143
- name: Commit and push bump to Prod UI image manifest
144-
run: |
144+
run: |-
145145
git config --global user.name "${GITHUB_ACTOR}"
146146
git config --global user.email "${GITHUB_ACTOR}@users.noreply.${INPUT_ORGANIZATION_DOMAIN}"
147147
git add deploy/k8s/overlays/openshift/prod/kustomization.yaml
@@ -189,9 +189,9 @@ jobs:
189189
190190
- name: Extract Release Tag
191191
id: get_release_tag
192-
run: |
192+
run: |-
193193
RELEASE_TAG="release-${{ github.event.release.tag_name }}"
194-
echo "RELEASE_TAG=$RELEASE_TAG" >> $GITHUB_ENV
194+
echo "RELEASE_TAG=${RELEASE_TAG}" >> "$GITHUB_ENV"
195195
196196
- name: Extract metadata (tags, labels) for PS image
197197
id: ghcr_ps_meta
@@ -201,13 +201,13 @@ jobs:
201201

202202
- name: Combine GHCR Tags with PR Tag
203203
id: combined_ghcr_ps_tags
204-
if: ${{ steps.get_release_tag.outputs.result }} != ""
205-
run: |
204+
if: ${{ steps.get_release_tag.outputs.result != '' }}
205+
run: |-
206206
TAGS="${{ steps.ghcr_ps_meta.outputs.tags }}"
207207
RELEASE_TAG="release-${{ steps.get_release_tag.outputs.RELEASE_TAG }}"
208208
COMBINED_TAGS="${RELEASE_TAG},${TAGS}"
209-
echo "COMBINED_TAGS=$COMBINED_TAGS" >> $GITHUB_ENV
210-
echo "RELEASE_TAG=$RELEASE_TAG" >> $GITHUB_ENV
209+
echo "COMBINED_TAGS=${COMBINED_TAGS}" >> "$GITHUB_ENV"
210+
echo "RELEASE_TAG=${RELEASE_TAG}" >> "$GITHUB_ENV"
211211
212212
- name: Extract metadata (tags, labels) for PS image
213213
id: quay_ps_meta
@@ -217,13 +217,13 @@ jobs:
217217

218218
- name: Combine Quay Tags with PR Tag
219219
id: combined_quay_ps_tags
220-
if: ${{ steps.get_release_tag.outputs.result }} != ""
221-
run: |
220+
if: ${{ steps.get_release_tag.outputs.result != '' }}
221+
run: |-
222222
TAGS="${{ steps.quay_ps_meta.outputs.tags }}"
223223
RELEASE_TAG="release-${{ steps.get_release_tag.outputs.result }}"
224224
COMBINED_TAGS="${RELEASE_TAG},${TAGS}"
225-
echo "COMBINED_TAGS=$COMBINED_TAGS" >> $GITHUB_ENV
226-
echo "RELEASE_TAG=$RELEASE_TAG" >> $GITHUB_ENV
225+
echo "COMBINED_TAGS=${COMBINED_TAGS}" >> "$GITHUB_ENV"
226+
echo "RELEASE_TAG=${RELEASE_TAG}" >> "$GITHUB_ENV"
227227
228228
- name: Build and push ps image to ghcr.io
229229
id: push-ps-ghcr
@@ -269,15 +269,15 @@ jobs:
269269
id: update_prod_ps_manifest_image
270270
env:
271271
RELEASE_TAG: ${{ steps.combined_quay_ps_tags.outputs.RELEASE_TAG }}
272-
run: |
272+
run: |-
273273
sudo wget https://github.com/mikefarah/yq/releases/download/v4.34.1/yq_linux_amd64 -O /usr/local/bin/yq
274274
sudo chmod +x /usr/local/bin/yq
275-
RELEASE_TAG="${RELEASE_TAG}" yq -i '
276-
(.images[] | select(.name == "quay.io/instructlab-ui/pathservice") | .newTag) = '$RELEASE_TAG'
275+
yq -i '
276+
(.images[] | select(.name == "quay.io/instructlab-ui/pathservice") | .newTag) = env(RELEASE_TAG)
277277
' deploy/k8s/overlays/openshift/prod/kustomization.yaml
278278
279279
- name: Commit and push bump to Prod PS image manifest
280-
run: |
280+
run: |-
281281
git config --global user.name "${GITHUB_ACTOR}"
282282
git config --global user.email "${GITHUB_ACTOR}@users.noreply.${INPUT_ORGANIZATION_DOMAIN}"
283283
git add deploy/k8s/overlays/openshift/prod/kustomization.yaml

0 commit comments

Comments
 (0)