Skip to content

Commit f0e4d1f

Browse files
committed
Fix GHCR primary tag display by reordering tags
- Put version tag first in tags list (GHCR displays first tag as primary) - Order: version tag → latest → stable → sha - Update esp-idf.yml: idf-v5.4.1 now first - Update platformio.yml: pio-v6.1.18 now first - Update ESP-Matter tags (still disabled) Documentation: - Update github-actions-standards.mdc tag order section - Clarify that version tag MUST be first for GHCR display - Add critical note about tag ordering This fixes GHCR displaying sha-XXXXXXX as primary tag instead of the semantic version tag.
1 parent e4c890d commit f0e4d1f

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

.cursor/rules/github-actions-standards.mdc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ jobs:
129129
platforms: linux/amd64,linux/arm64
130130
push: ${{ github.repository_owner == 'jethome-iot' && github.ref_name == 'master' }}
131131
tags: |
132+
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.<IMAGE_NAME> }}:<prefix>-${{ matrix.version }}
132133
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.<IMAGE_NAME> }}:latest
133134
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.<IMAGE_NAME> }}:stable
134-
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.<IMAGE_NAME> }}:<prefix>-${{ matrix.version }}
135135
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.<IMAGE_NAME> }}:sha-${{ steps.tags.outputs.sha_short }}
136136
cache-from: type=gha,scope=${{ env.<IMAGE_NAME> }}
137137
cache-to: type=gha,mode=max,scope=${{ env.<IMAGE_NAME> }}
@@ -231,9 +231,10 @@ jobs:
231231
- **No date tags** - Version tags are semantic and clear; SHA tags provide precise tracking
232232
- All tags created simultaneously in single build step via `docker/build-push-action`
233233

234-
**Tag Order:**
234+
**Tag Order (Critical for GHCR Display):**
235235
- List tags in the `tags:` field of `docker/build-push-action`
236-
- Order: `latest`, `stable`, version tag, `sha-<commit>` (last)
236+
- **Version tag MUST be first** - GHCR displays the first tag as the primary tag
237+
- Order: `<prefix>-v<version>` (first), `latest`, `stable`, `sha-<commit>` (last)
237238
- All tags point to the same multi-arch manifest automatically
238239

239240
## Workflow Testing

.github/workflows/esp-idf.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ jobs:
6969
platforms: linux/amd64,linux/arm64
7070
push: ${{ github.repository_owner == 'jethome-iot' && github.ref_name == 'master' }}
7171
tags: |
72+
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.ESP_IDF_IMAGE_NAME }}:idf-${{ matrix.idf_base_tag }}
7273
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.ESP_IDF_IMAGE_NAME }}:latest
7374
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.ESP_IDF_IMAGE_NAME }}:stable
74-
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.ESP_IDF_IMAGE_NAME }}:idf-${{ matrix.idf_base_tag }}
7575
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.ESP_IDF_IMAGE_NAME }}:sha-${{ steps.tags.outputs.sha_short }}
7676
cache-from: type=gha,scope=${{ env.ESP_IDF_IMAGE_NAME }}
7777
cache-to: type=gha,mode=max,scope=${{ env.ESP_IDF_IMAGE_NAME }}
@@ -119,9 +119,9 @@ jobs:
119119
platforms: linux/amd64,linux/arm64
120120
push: ${{ github.repository_owner == 'jethome-iot' && github.ref_name == 'master' }}
121121
tags: |
122+
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.ESP_MATTER_IMAGE_NAME }}:idf-${{ matrix.jethome_idf_base_tag }}-matter-${{ matrix.esp_matter_version }}
122123
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.ESP_MATTER_IMAGE_NAME }}:latest
123124
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.ESP_MATTER_IMAGE_NAME }}:stable
124-
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.ESP_MATTER_IMAGE_NAME }}:idf-${{ matrix.jethome_idf_base_tag }}-matter-${{ matrix.esp_matter_version }}
125125
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.ESP_MATTER_IMAGE_NAME }}:sha-${{ steps.tags.outputs.sha_short }}
126126
cache-from: type=gha,scope=${{ env.ESP_MATTER_IMAGE_NAME }}
127127
cache-to: type=gha,mode=max,scope=${{ env.ESP_MATTER_IMAGE_NAME }}

.github/workflows/platformio.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ jobs:
6565
platforms: linux/amd64,linux/arm64
6666
push: ${{ github.repository_owner == 'jethome-iot' && github.ref_name == 'master' }}
6767
tags: |
68+
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.PLATFORMIO_IMAGE_NAME }}:pio-${{ matrix.pio_version }}
6869
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.PLATFORMIO_IMAGE_NAME }}:latest
6970
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.PLATFORMIO_IMAGE_NAME }}:stable
70-
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.PLATFORMIO_IMAGE_NAME }}:pio-${{ matrix.pio_version }}
7171
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.PLATFORMIO_IMAGE_NAME }}:sha-${{ steps.tags.outputs.sha_short }}
7272
cache-from: type=gha,scope=${{ env.PLATFORMIO_IMAGE_NAME }}
7373
cache-to: type=gha,mode=max,scope=${{ env.PLATFORMIO_IMAGE_NAME }}

0 commit comments

Comments
 (0)