Skip to content

Commit 0814569

Browse files
committed
Add OCI labels to Dockerfile for GitHub repository linking and description
1 parent 10ddab4 commit 0814569

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -87,21 +87,7 @@ jobs:
8787
cache-from: type=gha
8888
cache-to: type=gha,mode=max
8989

90-
- name: Make package public
91-
if: github.event_name != 'pull_request'
92-
run: |
93-
# Wait a moment for the package to be fully created
94-
sleep 10
95-
96-
# Get package info and make it public
97-
PACKAGE_NAME=$(echo "${{ env.IMAGE_NAME_LOWER }}" | cut -d'/' -f2)
98-
99-
curl -X PATCH \
100-
-H "Accept: application/vnd.github+json" \
101-
-H "Authorization: Bearer ${{ secrets.GH_TOKEN }}" \
102-
-H "X-GitHub-Api-Version: 2022-11-28" \
103-
https://api.github.com/user/packages/container/${PACKAGE_NAME} \
104-
-d '{"visibility":"public"}' || echo "Package may already be public or error occurred"
90+
10591

10692
- name: Create release archives
10793
if: github.event_name == 'release'

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o tsflow .
1212

1313
FROM alpine:latest
1414

15+
# Add OCI labels for proper GitHub repository linking
16+
LABEL org.opencontainers.image.source=https://github.com/rajsinghtech/tsflow
17+
LABEL org.opencontainers.image.description="Network flow viewer for Tailscale networks"
18+
LABEL org.opencontainers.image.licenses=MIT
19+
1520
RUN apk --no-cache add ca-certificates
1621
RUN adduser -D -s /bin/sh tsflow
1722

0 commit comments

Comments
 (0)