Skip to content

Commit bbbca9d

Browse files
authored
Add release workflow (#2)
1 parent 1ddf788 commit bbbca9d

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

.github/workflows/release.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: "Release"
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
env:
8+
REGISTRY: "ghcr.io"
9+
IMAGE_NAME: "authzed/spicedb-playground"
10+
jobs:
11+
build-and-push-image:
12+
runs-on: "buildjet-4vcpu-ubuntu-2204"
13+
permissions:
14+
contents: "write"
15+
packages: "write"
16+
steps:
17+
- uses: "actions/checkout@v4"
18+
with:
19+
fetch-depth: 0
20+
- name: "Log in to container registry"
21+
uses: "docker/login-action@v3.1.0"
22+
with:
23+
registry: ${{ env.REGISTRY }}
24+
username: ${{ github.actor }}
25+
password: ${{ secrets.GITHUB_TOKEN }}
26+
- name: "Extract metadata (tags, labels) for Docker"
27+
id: meta
28+
uses: "docker/metadata-action@v5.5.1"
29+
with:
30+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
31+
tags: |
32+
type=semver,pattern={{raw}}
33+
- name: "Build and push Docker image"
34+
uses: "docker/build-push-action@v5.3.0"
35+
with:
36+
context: .
37+
push: true
38+
tags: ${{ steps.meta.outputs.tags }}
39+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)