Skip to content

Commit fa0453b

Browse files
committed
adjust tags
1 parent ce53efd commit fa0453b

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/build-server.yml

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

910
jobs:
1011
build-and-push:
@@ -21,11 +22,18 @@ jobs:
2122
id: meta
2223
uses: docker/metadata-action@v5
2324
with:
24-
images: ghcr.io/graphprotocol/hypergraph-server
25+
images: ghcr.io/${{ github.repository }}
26+
# TODO: Customize tagging behavior to our needs.
27+
tags: |
28+
type=ref,event=branch
29+
type=ref,event=pr
30+
type=semver,pattern={{version}}
31+
type=semver,pattern={{major}}.{{minor}}
32+
type=sha
2533
2634
- name: Login to ghcr.io
2735
uses: docker/login-action@v3
28-
# if: ${{ github.event_name != 'pull_request' }}
36+
if: ${{ github.event_name != 'pull_request' }}
2937
with:
3038
registry: ghcr.io
3139
username: ${{ github.actor }}
@@ -35,6 +43,7 @@ jobs:
3543
- name: Build and push
3644
uses: docker/build-push-action@v6
3745
with:
38-
# push: ${{ github.event_name != 'pull_request' }}
46+
platforms: linux/amd64,linux/arm64
47+
push: ${{ github.event_name != 'pull_request' }}
3948
tags: ${{ steps.meta.outputs.tags }}
4049
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)