Skip to content

Commit 223b925

Browse files
committed
adjust tags
1 parent ce53efd commit 223b925

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

.github/workflows/build-server.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
branches: [main]
66
push:
77
branches: [main]
8+
tags:
9+
- 'v*'
810

911
jobs:
1012
build-and-push:
@@ -21,11 +23,18 @@ jobs:
2123
id: meta
2224
uses: docker/metadata-action@v5
2325
with:
24-
images: ghcr.io/graphprotocol/hypergraph-server
26+
images: ghcr.io/${{ github.repository }}
27+
# TODO: Customize tagging behavior to our needs.
28+
tags: |
29+
type=ref,event=branch
30+
type=ref,event=pr
31+
type=semver,pattern={{version}}
32+
type=semver,pattern={{major}}.{{minor}}
33+
type=sha
2534
2635
- name: Login to ghcr.io
2736
uses: docker/login-action@v3
28-
# if: ${{ github.event_name != 'pull_request' }}
37+
if: ${{ github.event_name != 'pull_request' }}
2938
with:
3039
registry: ghcr.io
3140
username: ${{ github.actor }}
@@ -35,6 +44,7 @@ jobs:
3544
- name: Build and push
3645
uses: docker/build-push-action@v6
3746
with:
38-
# push: ${{ github.event_name != 'pull_request' }}
47+
platforms: linux/amd64,linux/arm64
48+
push: ${{ github.event_name != 'pull_request' }}
3949
tags: ${{ steps.meta.outputs.tags }}
4050
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)