Skip to content

Commit 80c033b

Browse files
committed
fix(ci): standardize image tag step ID across integration workflows
1 parent 0519b4b commit 80c033b

5 files changed

Lines changed: 21 additions & 21 deletions

File tree

.github/workflows/cerberus-integration.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
# Determine the correct image tag based on trigger context
9797
# For PRs: pr-{number}-{sha}, For branches: {sanitized-branch}-{sha}
9898
- name: Determine image tag
99-
id: image
99+
id: determine-tag
100100
env:
101101
EVENT: ${{ github.event.workflow_run.event }}
102102
REF: ${{ github.event.workflow_run.head_branch }}
@@ -162,7 +162,7 @@ jobs:
162162
max_attempts: 3
163163
retry_wait_seconds: 10
164164
command: |
165-
IMAGE_NAME="ghcr.io/${{ github.repository_owner }}/charon:${{ steps.image.outputs.tag }}"
165+
IMAGE_NAME="ghcr.io/${{ github.repository_owner }}/charon:${{ steps.determine-tag.outputs.tag }}"
166166
echo "Pulling image: $IMAGE_NAME"
167167
docker pull "$IMAGE_NAME"
168168
docker tag "$IMAGE_NAME" charon:local
@@ -174,12 +174,12 @@ jobs:
174174
if: steps.pull_image.outcome == 'failure'
175175
env:
176176
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
177-
SHA: ${{ steps.image.outputs.sha }}
177+
SHA: ${{ steps.determine-tag.outputs.sha }}
178178
run: |
179179
echo "⚠️ Registry pull failed, falling back to artifact..."
180180
181181
# Determine artifact name based on source type
182-
if [[ "${{ steps.image.outputs.source_type }}" == "pr" ]]; then
182+
if [[ "${{ steps.determine-tag.outputs.source_type }}" == "pr" ]]; then
183183
PR_NUM=$(echo '${{ toJson(github.event.workflow_run.pull_requests) }}' | jq -r '.[0].number')
184184
ARTIFACT_NAME="pr-image-${PR_NUM}"
185185
else
@@ -203,7 +203,7 @@ jobs:
203203
# Validate image freshness by checking SHA label
204204
- name: Validate image SHA
205205
env:
206-
SHA: ${{ steps.image.outputs.sha }}
206+
SHA: ${{ steps.determine-tag.outputs.sha }}
207207
run: |
208208
LABEL_SHA=$(docker inspect charon:local --format '{{index .Config.Labels "org.opencontainers.image.revision"}}' | cut -c1-7)
209209
echo "Expected SHA: $SHA"

.github/workflows/crowdsec-integration.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ jobs:
133133
# Determine the correct image tag based on trigger context
134134
# For PRs: pr-{number}-{sha}, For branches: {sanitized-branch}-{sha}
135135
- name: Determine image tag
136-
id: image
136+
id: determine-tag
137137
env:
138138
EVENT: ${{ github.event.workflow_run.event }}
139139
REF: ${{ github.event.workflow_run.head_branch }}
@@ -199,7 +199,7 @@ jobs:
199199
max_attempts: 3
200200
retry_wait_seconds: 10
201201
command: |
202-
IMAGE_NAME="ghcr.io/${{ github.repository_owner }}/charon:${{ steps.image.outputs.tag }}"
202+
IMAGE_NAME="ghcr.io/${{ github.repository_owner }}/charon:${{ steps.determine-tag.outputs.tag }}"
203203
echo "Pulling image: $IMAGE_NAME"
204204
docker pull "$IMAGE_NAME"
205205
docker tag "$IMAGE_NAME" charon:local
@@ -211,12 +211,12 @@ jobs:
211211
if: steps.pull_image.outcome == 'failure'
212212
env:
213213
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
214-
SHA: ${{ steps.image.outputs.sha }}
214+
SHA: ${{ steps.determine-tag.outputs.sha }}
215215
run: |
216216
echo "⚠️ Registry pull failed, falling back to artifact..."
217217
218218
# Determine artifact name based on source type
219-
if [[ "${{ steps.image.outputs.source_type }}" == "pr" ]]; then
219+
if [[ "${{ steps.determine-tag.outputs.source_type }}" == "pr" ]]; then
220220
PR_NUM=$(echo '${{ toJson(github.event.workflow_run.pull_requests) }}' | jq -r '.[0].number')
221221
ARTIFACT_NAME="pr-image-${PR_NUM}"
222222
else
@@ -240,7 +240,7 @@ jobs:
240240
# Validate image freshness by checking SHA label
241241
- name: Validate image SHA
242242
env:
243-
SHA: ${{ steps.image.outputs.sha }}
243+
SHA: ${{ steps.determine-tag.outputs.sha }}
244244
run: |
245245
LABEL_SHA=$(docker inspect charon:local --format '{{index .Config.Labels "org.opencontainers.image.revision"}}' | cut -c1-7)
246246
echo "Expected SHA: $SHA"

.github/workflows/e2e-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ jobs:
111111
# Determine the correct image tag based on trigger context
112112
# For PRs: pr-{number}-{sha}, For branches: {sanitized-branch}-{sha}
113113
- name: Determine image tag
114-
id: image
114+
id: determine-tag
115115
env:
116116
EVENT: ${{ github.event.workflow_run.event }}
117117
REF: ${{ github.event.workflow_run.head_branch }}

.github/workflows/rate-limit-integration.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
# Determine the correct image tag based on trigger context
9797
# For PRs: pr-{number}-{sha}, For branches: {sanitized-branch}-{sha}
9898
- name: Determine image tag
99-
id: image
99+
id: determine-tag
100100
env:
101101
EVENT: ${{ github.event.workflow_run.event }}
102102
REF: ${{ github.event.workflow_run.head_branch }}
@@ -162,7 +162,7 @@ jobs:
162162
max_attempts: 3
163163
retry_wait_seconds: 10
164164
command: |
165-
IMAGE_NAME="ghcr.io/${{ github.repository_owner }}/charon:${{ steps.image.outputs.tag }}"
165+
IMAGE_NAME="ghcr.io/${{ github.repository_owner }}/charon:${{ steps.determine-tag.outputs.tag }}"
166166
echo "Pulling image: $IMAGE_NAME"
167167
docker pull "$IMAGE_NAME"
168168
docker tag "$IMAGE_NAME" charon:local
@@ -174,12 +174,12 @@ jobs:
174174
if: steps.pull_image.outcome == 'failure'
175175
env:
176176
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
177-
SHA: ${{ steps.image.outputs.sha }}
177+
SHA: ${{ steps.determine-tag.outputs.sha }}
178178
run: |
179179
echo "⚠️ Registry pull failed, falling back to artifact..."
180180
181181
# Determine artifact name based on source type
182-
if [[ "${{ steps.image.outputs.source_type }}" == "pr" ]]; then
182+
if [[ "${{ steps.determine-tag.outputs.source_type }}" == "pr" ]]; then
183183
PR_NUM=$(echo '${{ toJson(github.event.workflow_run.pull_requests) }}' | jq -r '.[0].number')
184184
ARTIFACT_NAME="pr-image-${PR_NUM}"
185185
else
@@ -203,7 +203,7 @@ jobs:
203203
# Validate image freshness by checking SHA label
204204
- name: Validate image SHA
205205
env:
206-
SHA: ${{ steps.image.outputs.sha }}
206+
SHA: ${{ steps.determine-tag.outputs.sha }}
207207
run: |
208208
LABEL_SHA=$(docker inspect charon:local --format '{{index .Config.Labels "org.opencontainers.image.revision"}}' | cut -c1-7)
209209
echo "Expected SHA: $SHA"

.github/workflows/waf-integration.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
# Determine the correct image tag based on trigger context
9797
# For PRs: pr-{number}-{sha}, For branches: {sanitized-branch}-{sha}
9898
- name: Determine image tag
99-
id: image
99+
id: determine-tag
100100
env:
101101
EVENT: ${{ github.event.workflow_run.event }}
102102
REF: ${{ github.event.workflow_run.head_branch }}
@@ -162,7 +162,7 @@ jobs:
162162
max_attempts: 3
163163
retry_wait_seconds: 10
164164
command: |
165-
IMAGE_NAME="ghcr.io/${{ github.repository_owner }}/charon:${{ steps.image.outputs.tag }}"
165+
IMAGE_NAME="ghcr.io/${{ github.repository_owner }}/charon:${{ steps.determine-tag.outputs.tag }}"
166166
echo "Pulling image: $IMAGE_NAME"
167167
docker pull "$IMAGE_NAME"
168168
docker tag "$IMAGE_NAME" charon:local
@@ -174,12 +174,12 @@ jobs:
174174
if: steps.pull_image.outcome == 'failure'
175175
env:
176176
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
177-
SHA: ${{ steps.image.outputs.sha }}
177+
SHA: ${{ steps.determine-tag.outputs.sha }}
178178
run: |
179179
echo "⚠️ Registry pull failed, falling back to artifact..."
180180
181181
# Determine artifact name based on source type
182-
if [[ "${{ steps.image.outputs.source_type }}" == "pr" ]]; then
182+
if [[ "${{ steps.determine-tag.outputs.source_type }}" == "pr" ]]; then
183183
PR_NUM=$(echo '${{ toJson(github.event.workflow_run.pull_requests) }}' | jq -r '.[0].number')
184184
ARTIFACT_NAME="pr-image-${PR_NUM}"
185185
else
@@ -203,7 +203,7 @@ jobs:
203203
# Validate image freshness by checking SHA label
204204
- name: Validate image SHA
205205
env:
206-
SHA: ${{ steps.image.outputs.sha }}
206+
SHA: ${{ steps.determine-tag.outputs.sha }}
207207
run: |
208208
LABEL_SHA=$(docker inspect charon:local --format '{{index .Config.Labels "org.opencontainers.image.revision"}}' | cut -c1-7)
209209
echo "Expected SHA: $SHA"

0 commit comments

Comments
 (0)