Skip to content

Commit 5b854b5

Browse files
committed
add release pipeline
1 parent ed1b6fb commit 5b854b5

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

.github/workflows/release.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build and Push Docker Image
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build-and-push:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
packages: write
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Docker Buildx
20+
uses: docker/setup-buildx-action@v3
21+
22+
- name: Log into GitHub Container Registry
23+
uses: docker/login-action@v3
24+
with:
25+
registry: ghcr.io
26+
username: ${{ github.actor }}
27+
password: ${{ secrets.GITHUB_TOKEN }}
28+
29+
- name: Extract version from tag
30+
id: version
31+
run: |
32+
VERSION=$(echo $GITHUB_REF | sed -nE 's!refs/tags/v?!!p')
33+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
34+
35+
- name: Build and push Docker image
36+
uses: docker/build-push-action@v5
37+
with:
38+
context: .
39+
push: true
40+
tags: ghcr.io/${{ github.repository }}:${{ steps.version.outputs.VERSION }}
41+
cache-from: type=gha
42+
cache-to: type=gha,mode=max

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ This container provides a comprehensive toolkit for debugging networking issues,
4646
## Quick Start
4747

4848
```bash
49-
kubectl run debug-session --rm -i --tty --image=schwarzit/stackit-debug-container:latest
49+
kubectl run debug-session --rm -i --tty --image=ghcr.io/stackitcloud/stackit-debug-container:latest
5050
```
5151

5252
## Security Features

0 commit comments

Comments
 (0)