Skip to content

Commit 683705c

Browse files
committed
fix tagging
1 parent 9e25dd5 commit 683705c

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

.github/actions/build-app/action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ inputs:
1313
platforms:
1414
required: true
1515
description: Image platforms
16+
tag-prefix:
17+
required: true
18+
description: Tag prefix (e.g. 'rn' for 'rn-123-a1')
1619

1720
runs:
1821
using: composite
@@ -26,7 +29,7 @@ runs:
2629
flavor: |
2730
latest=false
2831
tags: |
29-
type=raw,value=rn-${{ github.run_number }}-a${{ github.run_attempt }}
32+
type=raw,value=${{ inputs.tag-prefix }}-${{ github.run_number }}-a${{ github.run_attempt }}
3033
3134
- name: Build and push
3235
uses: docker/build-push-action@v6

.github/workflows/ci-build.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ on:
2222
required: false
2323
type: boolean
2424
default: false
25+
tag-prefix:
26+
description: 'Tag prefix to use'
27+
required: false
28+
type: string
29+
default: 'rn'
2530
workflow_dispatch:
2631

2732
name: ci-build
@@ -92,6 +97,7 @@ jobs:
9297
push: ${{ inputs.push || (github.ref_protected && github.event_name != 'pull_request') }}
9398
image: ${{ matrix.image }}
9499
platforms: ${{ inputs.platforms || 'linux/amd64' }}
100+
tag-prefix: ${{ inputs.tag-prefix }}
95101

96102
promote-image:
97103
name: Promote Image (${{ matrix.image }})
@@ -121,7 +127,7 @@ jobs:
121127
uses: ./.github/actions/promote-image
122128
with:
123129
image: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ matrix.image }}
124-
run-tag: rn-${{ github.run_number }}-a${{ github.run_attempt }}
130+
run-tag: ${{ inputs.tag-prefix }}-${{ github.run_number }}-a${{ github.run_attempt }}
125131
latest: ${{ inputs.latest || false }}
126132

127133
deploy-prod-workflow:
@@ -138,7 +144,7 @@ jobs:
138144
event-type: update-backend-prod
139145
client-payload: |
140146
{
141-
"tag": "rn-${{ github.run_number }}-a${{ github.run_attempt }}"
147+
"tag": "${{ inputs.tag-prefix }}-${{ github.run_number }}-a${{ github.run_attempt }}"
142148
}
143149
144150
deploy-staging:
@@ -156,7 +162,7 @@ jobs:
156162
event-type: update-backend-staging
157163
client-payload: |
158164
{
159-
"tag": "rn-${{ github.run_number }}-a${{ github.run_attempt }}"
165+
"tag": "${{ inputs.tag-prefix }}-${{ github.run_number }}-a${{ github.run_attempt }}"
160166
}
161167
162168
deploy-dev:

.github/workflows/ci-tag.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,5 @@ jobs:
3434
with:
3535
platforms: linux/amd64,linux/arm64
3636
latest: ${{ needs.get-latest-tag.outputs.latest-tag == github.ref_name }}
37-
push: true
37+
push: true
38+
tag-prefix: 'tag'

0 commit comments

Comments
 (0)