Skip to content

Commit 47375e1

Browse files
committed
Added release and pre-release workflows
1 parent 047add1 commit 47375e1

File tree

2 files changed

+94
-0
lines changed

2 files changed

+94
-0
lines changed

.github/workflows/pre-release.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Pre-release Publish
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Version to publish (e.g., 1.0.0-preview.1)'
8+
required: true
9+
type: string
10+
11+
permissions:
12+
packages: write
13+
contents: read
14+
15+
jobs:
16+
build-and-push:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
22+
- name: Set up Docker Buildx
23+
uses: docker/setup-buildx-action@v3
24+
25+
- name: Login to Docker Hub
26+
uses: docker/login-action@v3
27+
with:
28+
username: ${{ secrets.DOCKERHUB_USERNAME }}
29+
password: ${{ secrets.DOCKERHUB_TOKEN }}
30+
31+
- name: Extract metadata for Docker
32+
id: meta
33+
uses: docker/metadata-action@v5
34+
with:
35+
images: digmatic/digma-sse-server
36+
tags: |
37+
type=raw,value=${{ github.event.inputs.version }}
38+
type=raw,value=preview,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
39+
40+
- name: Build and push Docker image
41+
uses: docker/build-push-action@v5
42+
with:
43+
context: .
44+
file: ./src/DigmaSSEServer/Dockerfile
45+
push: true
46+
tags: ${{ steps.meta.outputs.tags }}
47+
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/release.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Release Publish
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Version to publish (e.g., 1.0.0)'
8+
required: true
9+
type: string
10+
11+
permissions:
12+
packages: write
13+
contents: read
14+
15+
jobs:
16+
build-and-push:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
22+
- name: Set up Docker Buildx
23+
uses: docker/setup-buildx-action@v3
24+
25+
- name: Login to Docker Hub
26+
uses: docker/login-action@v3
27+
with:
28+
username: ${{ secrets.DOCKERHUB_USERNAME }}
29+
password: ${{ secrets.DOCKERHUB_TOKEN }}
30+
31+
- name: Extract metadata for Docker
32+
id: meta
33+
uses: docker/metadata-action@v5
34+
with:
35+
images: digmatic/digma-sse-server
36+
tags: |
37+
type=raw,value=${{ github.event.inputs.version }}
38+
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
39+
40+
- name: Build and push Docker image
41+
uses: docker/build-push-action@v5
42+
with:
43+
context: .
44+
file: ./src/DigmaSSEServer/Dockerfile
45+
push: true
46+
tags: ${{ steps.meta.outputs.tags }}
47+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)