Skip to content

Commit c479597

Browse files
authored
Merge pull request #5 from Salvoxia/chore/Sogo5.12.0
Chore/SOGo v5.12.0
2 parents 6f2f538 + 272d422 commit c479597

File tree

3 files changed

+72
-5
lines changed

3 files changed

+72
-5
lines changed

.github/workflows/build-image.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,14 @@ jobs:
3232
${{ steps.image_name.outputs.image_name }}
3333
# generate Docker tags based on the following events/attributes
3434
tags: |
35-
# set latest tag for default branch
36-
type=raw,value=latest,enable={{is_default_branch}}
37-
# set edge tag for dev branch
38-
type=edge,enable=true,branch=dev
35+
# set edge tag for default branch
36+
type=edge,enable={{is_default_branch}}
37+
# set dev tag for dev branch
38+
type=raw,value=dev,enable=${{ github.ref == format('refs/heads/{0}', 'dev') }},branch=dev
3939
# Tags for non SemVer tag names
4040
type=match,pattern=([0-9]+.*),group=1
41+
# latest tag for any tags
42+
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }},event=tag
4143
4244
- name: Set up QEMU
4345
uses: docker/setup-qemu-action@v3

.github/workflows/ci.yaml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
name: CI
3+
4+
'on':
5+
pull_request:
6+
push:
7+
paths-ignore:
8+
- 'README.md'
9+
10+
jobs:
11+
docker:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Convert repository name ot image name
18+
id: image_name
19+
run: |
20+
sed -E -e 's/docker-//' -e 's/^/image_name=/' <<<"${{ github.repository }}" >> "$GITHUB_OUTPUT"
21+
22+
- name: Generate Docker tag names
23+
id: meta
24+
uses: docker/metadata-action@v5
25+
with:
26+
# list of Docker images to use as base name for tags
27+
images: |
28+
ghcr.io/${{ steps.image_name.outputs.image_name }}
29+
${{ steps.image_name.outputs.image_name }}
30+
# generate Docker tags based on the following events/attributes
31+
tags: |
32+
# set edge tag for default branch
33+
type=edge,enable={{is_default_branch}}
34+
# set dev tag for dev branch
35+
type=raw,value=dev,enable=${{ github.ref == format('refs/heads/{0}', 'dev') }},branch=dev
36+
# set build-test tag for any branch not dev or the default one
37+
type=raw,value=build-test,enable=${{ github.ref != format('refs/heads/{0}', 'dev') && github.ref != format('refs/heads/{0}', github.event.repository.default_branch) }},branch=dev
38+
39+
- name: Set up QEMU
40+
uses: docker/setup-qemu-action@v3
41+
42+
- name: Set up Docker Buildx
43+
uses: docker/setup-buildx-action@v3
44+
45+
- name: Login to GHCR
46+
uses: docker/login-action@v3
47+
with:
48+
registry: ghcr.io
49+
username: ${{ github.repository_owner }}
50+
password: ${{ secrets.REGISTRY_TOKEN }}
51+
52+
- name: Login to Docker Hub
53+
uses: docker/login-action@v3
54+
with:
55+
username: ${{ secrets.DOCKERHUB_USERNAME }}
56+
password: ${{ secrets.DOCKERHUB_TOKEN }}
57+
58+
- name: Build and push
59+
uses: docker/build-push-action@v5
60+
with:
61+
context: .
62+
platforms: linux/arm64/v8,linux/amd64
63+
# Push only for default branch or dev branch
64+
push: ${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) || github.ref == format('refs/heads/{0}', 'dev') }}
65+
tags: ${{ steps.meta.outputs.tags }}

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FROM ubuntu:24.04
2-
ENV SOGO_VERSION=5.11.2
2+
ENV SOGO_VERSION=5.12.0
33
ENV SOPE_VERSION=${SOGO_VERSION}
44
# Attention when chaning the source URLs!
55
# The script below assumes the source zip files to contain a

0 commit comments

Comments
 (0)