Skip to content

Commit a24da0d

Browse files
committed
chore: prepare release v0.0.5
1 parent e0ed195 commit a24da0d

4 files changed

Lines changed: 59 additions & 22 deletions

File tree

.github/workflows/release.yml

Lines changed: 46 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,19 @@ jobs:
167167
with:
168168
path: artifacts
169169

170+
- name: Extract version
171+
id: version
172+
run: |
173+
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
174+
VERSION=${GITHUB_REF#refs/tags/v}
175+
else
176+
VERSION=latest
177+
fi
178+
echo "version=$VERSION" >> $GITHUB_OUTPUT
179+
# Ensure lowercase for container registry
180+
REPO_OWNER=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
181+
echo "repo_owner=$REPO_OWNER" >> $GITHUB_OUTPUT
182+
170183
- name: Set up Docker Buildx
171184
uses: docker/setup-buildx-action@v3
172185

@@ -178,15 +191,15 @@ jobs:
178191
username: ${{ github.actor }}
179192
password: ${{ secrets.GITHUB_TOKEN }}
180193

181-
- name: Extract version
182-
id: version
194+
- name: Verify registry access
195+
if: ${{ inputs.dry_run != true }}
183196
run: |
184-
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
185-
VERSION=${GITHUB_REF#refs/tags/v}
186-
else
187-
VERSION=latest
188-
fi
189-
echo "version=$VERSION" >> $GITHUB_OUTPUT
197+
echo "Checking registry access for ${{ github.actor }}..."
198+
echo "Repository: ${{ github.repository }}"
199+
echo "Registry URL: ghcr.io/${{ steps.version.outputs.repo_owner }}/yamldap"
200+
echo "Testing docker login..."
201+
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
202+
echo "Login successful!"
190203
191204
- name: Prepare binaries for multi-arch build
192205
run: |
@@ -209,17 +222,30 @@ jobs:
209222
ENTRYPOINT ["/yamldap"]
210223
EOF
211224
212-
- name: Build and push multi-arch image
225+
- name: Build and push images
213226
if: ${{ inputs.dry_run != true }}
214-
uses: docker/build-push-action@v5
215-
with:
216-
context: docker-context
217-
platforms: linux/amd64,linux/arm64
218-
push: true
219-
provenance: false
220-
tags: |
221-
ghcr.io/rvben/yamldap:${{ steps.version.outputs.version }}
222-
ghcr.io/rvben/yamldap:latest
227+
run: |
228+
# Build for each platform separately using buildx
229+
docker buildx build \
230+
--platform linux/amd64 \
231+
--build-arg TARGETARCH=amd64 \
232+
-t ghcr.io/${{ steps.version.outputs.repo_owner }}/yamldap:${{ steps.version.outputs.version }}-amd64 \
233+
--push \
234+
docker-context
235+
236+
docker buildx build \
237+
--platform linux/arm64 \
238+
--build-arg TARGETARCH=arm64 \
239+
-t ghcr.io/${{ steps.version.outputs.repo_owner }}/yamldap:${{ steps.version.outputs.version }}-arm64 \
240+
--push \
241+
docker-context
242+
243+
# Create and push multi-arch manifests
244+
docker buildx imagetools create \
245+
-t ghcr.io/${{ steps.version.outputs.repo_owner }}/yamldap:${{ steps.version.outputs.version }} \
246+
-t ghcr.io/${{ steps.version.outputs.repo_owner }}/yamldap:latest \
247+
ghcr.io/${{ steps.version.outputs.repo_owner }}/yamldap:${{ steps.version.outputs.version }}-amd64 \
248+
ghcr.io/${{ steps.version.outputs.repo_owner }}/yamldap:${{ steps.version.outputs.version }}-arm64
223249
224250
- name: Test Docker build (dry run)
225251
if: ${{ inputs.dry_run == true }}
@@ -229,8 +255,8 @@ jobs:
229255
ls -la artifacts/
230256
echo ""
231257
echo "- Would create multi-arch image with tags:"
232-
echo " - ghcr.io/rvben/yamldap:${{ steps.version.outputs.version }}"
233-
echo " - ghcr.io/rvben/yamldap:latest"
258+
echo " - ghcr.io/${{ steps.version.outputs.repo_owner }}/yamldap:${{ steps.version.outputs.version }}"
259+
echo " - ghcr.io/${{ steps.version.outputs.repo_owner }}/yamldap:latest"
234260
echo "- Platforms: linux/amd64, linux/arm64"
235261
236262
# Test build for current platform

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.0.5] - 2025-06-13
9+
10+
### Fixed
11+
- Reworked Docker image building to push platform-specific images before creating multi-arch manifest
12+
- Added registry access verification step to debug authentication issues
13+
- Fixed step ordering to ensure version extraction happens before registry operations
14+
15+
### Changed
16+
- Split multi-platform Docker build into separate platform builds followed by manifest creation
17+
- Added explicit buildx commands for better control over the build process
18+
819
## [0.0.4] - 2025-06-13
920

1021
### Fixed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "yamldap"
3-
version = "0.0.4"
3+
version = "0.0.5"
44
edition = "2021"
55
authors = ["Ruben J. Jongejan <ruben.jongejan@gmail.com>"]
66
description = "A lightweight LDAP server that serves directory data from YAML files"

0 commit comments

Comments
 (0)