Skip to content

Commit 52236e1

Browse files
committed
ci: create deploy workflow
1 parent 80dfe42 commit 52236e1

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/deploy_image.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Deploy image to ghcr.io
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
workflow_dispatch:
8+
9+
env:
10+
IMAGE_NAME: pubsub-emulator-lite
11+
12+
jobs:
13+
build-push-image:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
packages: write
18+
steps:
19+
- uses: actions/checkout@v5
20+
- uses: docker/setup-buildx-action@v3
21+
with:
22+
cache-binary: false
23+
- uses: docker/login-action@v3
24+
with:
25+
registry: ghcr.io
26+
username: ${{ github.actor }}
27+
password: ${{ secrets.GITHUB_TOKEN }}
28+
- uses: docker/metadata-action@v3
29+
id: metadata
30+
with:
31+
images: ghcr.io/${{ env.IMAGE_NAME }}
32+
- uses: docker/build-push-action@v6
33+
with:
34+
context: .
35+
push: true
36+
tags: ${{ steps.metadata.outputs.tags }}
37+
labels: ${{ steps.metadata.outputs.labels }}
38+
platforms: linux/amd64,linux/arm64

0 commit comments

Comments
 (0)