Skip to content

Commit 3404780

Browse files
committed
feat: delos-publish
1 parent 155bd86 commit 3404780

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Delos Publish to Image Registry
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*-delos"
7+
workflow_dispatch:
8+
inputs:
9+
version:
10+
description: "Version to publish (e.g. 2.183.1-delos)"
11+
required: true
12+
type: string
13+
14+
permissions:
15+
contents: read
16+
packages: write
17+
18+
jobs:
19+
publish:
20+
runs-on: ubuntu-latest
21+
permissions:
22+
contents: read
23+
packages: write
24+
steps:
25+
- name: Checkout code
26+
uses: actions/checkout@v4
27+
28+
- name: Resolve version
29+
id: version
30+
run: |
31+
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
32+
VERSION="${{ inputs.version }}"
33+
else
34+
# Strip leading 'v' from tag name
35+
VERSION="${GITHUB_REF_NAME#v}"
36+
fi
37+
echo "VERSION=${VERSION}" >> "${GITHUB_OUTPUT}"
38+
39+
- name: Patch Dockerfile with release version
40+
run: |
41+
set -ex
42+
sed -i 's/RELEASE_VERSION=unspecified/RELEASE_VERSION=${{ steps.version.outputs.VERSION }}/' Dockerfile
43+
44+
- uses: docker/setup-qemu-action@v2
45+
with:
46+
platforms: amd64,arm64
47+
48+
- uses: docker/setup-buildx-action@v2
49+
50+
- name: Login to GHCR
51+
uses: docker/login-action@v2
52+
with:
53+
registry: ghcr.io
54+
username: ${{ github.actor }}
55+
password: ${{ secrets.GITHUB_TOKEN }}
56+
57+
- name: Build and push
58+
uses: docker/build-push-action@v3
59+
with:
60+
context: .
61+
push: true
62+
platforms: linux/amd64,linux/arm64
63+
tags: ghcr.io/delos-intelligence/auth:v${{ steps.version.outputs.VERSION }}
64+
cache-from: type=gha
65+
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)