Skip to content

Commit 32462b9

Browse files
erikologicclaude
andcommitted
Add branch-specific Docker image tags
Update GitHub Actions workflow to include branch name prefix in Docker image tags when building from non-main branches. Tag format: - Main branch: bsky-<sha>, bsky-<timestamp>, bsky-latest - Other branches: bsky-<branch>-<sha>, bsky-<branch>-<timestamp>, bsky-<branch>-latest This allows multiple branches to build and push images without conflicting tags. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 880dd1f commit 32462b9

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

.github/workflows/build-and-push-bsky-ghcr.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ on:
44
push:
55
branches:
66
- main
7-
- divy/etcd-dp-host-list
7+
- flashes-appview
8+
89
env:
910
REGISTRY: ghcr.io
1011
USERNAME: ${{ github.actor }}
@@ -55,9 +56,9 @@ jobs:
5556
images: |
5657
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
5758
tags: |
58-
type=sha,enable=true,priority=100,prefix=bsky-,suffix=,format=long
59-
type=raw,value=bsky-{{date 'YYYY-MM-DDTHH-mm-ssZ'}}
60-
bsky-latest
59+
type=sha,enable=true,priority=100,prefix=bsky-${{ github.ref_name != 'main' && format('{0}-', github.ref_name) || '' }},suffix=,format=long
60+
type=raw,value=bsky-${{ github.ref_name != 'main' && format('{0}-', github.ref_name) || '' }}{{date 'YYYY-MM-DDTHH-mm-ssZ'}}
61+
type=raw,value=bsky-${{ github.ref_name != 'main' && format('{0}-', github.ref_name) || '' }}latest
6162
6263
- name: Build and push by digest
6364
id: build
@@ -123,9 +124,9 @@ jobs:
123124
images: |
124125
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
125126
tags: |
126-
type=sha,enable=true,priority=100,prefix=bsky-,suffix=,format=long
127-
type=raw,value=bsky-{{date 'YYYY-MM-DDTHH-mm-ssZ'}}
128-
bsky-latest
127+
type=sha,enable=true,priority=100,prefix=bsky-${{ github.ref_name != 'main' && format('{0}-', github.ref_name) || '' }},suffix=,format=long
128+
type=raw,value=bsky-${{ github.ref_name != 'main' && format('{0}-', github.ref_name) || '' }}{{date 'YYYY-MM-DDTHH-mm-ssZ'}}
129+
type=raw,value=bsky-${{ github.ref_name != 'main' && format('{0}-', github.ref_name) || '' }}latest
129130
130131
- name: Create manifest list and push
131132
id: merge

0 commit comments

Comments
 (0)