Skip to content

Commit 6931cd2

Browse files
authored
Merge pull request #12 from treezio/feat/docker-release
feat: docker release
2 parents 36bd3e9 + 685ba05 commit 6931cd2

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Publish Docker image to GHCR
2+
3+
on:
4+
release:
5+
types: [published]
6+
push:
7+
branches:
8+
- feat/docker-release
9+
10+
jobs:
11+
build-and-push:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
packages: write
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Docker Buildx
21+
uses: docker/setup-buildx-action@v3
22+
23+
- name: Log in to GitHub Container Registry
24+
uses: docker/login-action@v3
25+
with:
26+
registry: ghcr.io
27+
username: ${{ github.actor }}
28+
password: ${{ secrets.GITHUB_TOKEN }}
29+
30+
# - name: Extract release tag
31+
# id: extract_tag
32+
# run: echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
33+
34+
- name: Build and push Docker image
35+
uses: docker/build-push-action@v5
36+
with:
37+
context: .
38+
push: true
39+
tags: ghcr.io/treezio/drifthound:v0.1.0

0 commit comments

Comments
 (0)