13 Commits

Author SHA1 Message Date
jcabillot 1d539eb1d3 Merge pull request 'chore(deps): update hadolint/hadolint-action action to v3.3.0' (#9) from renovate/hadolint-hadolint-action-3.x into master
Docker Build and Push / lint (push) Successful in 6s
Docker Build and Push / build (push) Successful in 19s
Docker Build and Push / test (push) Successful in 12s
Docker Build and Push / push (push) Successful in 17s
Reviewed-on: #9
2026-06-12 07:34:02 -04:00
renovate 2c6e3b3705 chore(deps): update hadolint/hadolint-action action to v3.3.0
Docker Build and Push / lint (pull_request) Successful in 6s
Docker Build and Push / build (pull_request) Successful in 23s
Docker Build and Push / test (pull_request) Successful in 14s
Docker Build and Push / push (pull_request) Has been skipped
2026-06-12 01:18:41 +00:00
jcabillot dfd03220ca Merge pull request 'fix: add version comments to Gitea Actions workflow' (#8) from fix/action-version-comments into master
Docker Build and Push / lint (push) Successful in 7s
Docker Build and Push / build (push) Successful in 19s
Docker Build and Push / test (push) Successful in 14s
Docker Build and Push / push (push) Successful in 19s
Reviewed-on: #8
2026-06-11 21:13:36 -04:00
Sagent c0242bf1c6 fix: add version comments to Gitea Actions workflow
Docker Build and Push / lint (pull_request) Successful in 7s
Docker Build and Push / build (pull_request) Successful in 17s
Docker Build and Push / test (pull_request) Successful in 9s
Docker Build and Push / push (pull_request) Has been skipped
2026-06-11 23:11:31 +00:00
cloudix_mcp_server 6f35b863fa Merge pull request 'chore(deps): update alpine docker tag to v3.24' (#7) from renovate/alpine-3.x into master
Docker Build and Push / lint (push) Successful in 7s
Docker Build and Push / build (push) Successful in 14s
Docker Build and Push / test (push) Successful in 11s
Docker Build and Push / push (push) Successful in 20s
2026-06-10 19:18:25 -04:00
renovate ce0844714d chore(deps): update alpine docker tag to v3.24
Docker Build and Push / lint (pull_request) Successful in 6s
Docker Build and Push / build (pull_request) Successful in 17s
Docker Build and Push / test (pull_request) Successful in 9s
Docker Build and Push / push (pull_request) Has been skipped
2026-06-10 17:39:03 +00:00
jcabillot 7d83260030 Merge pull request 'Migrate CI to 4-job pipeline with SHA-pinned actions' (#4) from feat/gitea-actions-v2 into master
Docker Build and Push / lint (push) Failing after 10m20s
Docker Build and Push / build (push) Has been skipped
Docker Build and Push / test (push) Has been skipped
Docker Build and Push / push (push) Has been skipped
Reviewed-on: #4
2026-06-09 08:34:43 -04:00
cloudix_mcp_server 8f2a9fca91 Fix hadolint: add DL3018 ignore for apk
Docker Build and Push / lint (pull_request) Successful in 7s
Docker Build and Push / build (pull_request) Successful in 51s
Docker Build and Push / test (pull_request) Successful in 10s
Docker Build and Push / push (pull_request) Has been skipped
2026-06-08 22:28:17 -04:00
cloudix_mcp_server 41d279dd4a Migrate CI to 4-job pipeline with SHA-pinned actions 2026-06-08 22:28:03 -04:00
cloudix_mcp_server b34e4da58b Add CLI smoke test for docker-dynhost 2026-06-08 22:26:44 -04:00
jcabillot 5f17819c15 Merge pull request 'chore: improve renovate dependency detection' (#3) from chore/renovate into master
Docker Build and Push / build (push) Successful in 38s
Reviewed-on: #3
2026-06-08 22:17:42 -04:00
Sagent 3dbc4af815 chore: improve renovate dependency detection
Docker Build and Push / build (pull_request) Successful in 25s
2026-06-09 02:12:45 +00:00
jcabillot 907fbd03b5 feat: add Gitea Actions workflow
Docker Build and Push / build (push) Successful in 31s
feat: add Gitea Actions workflow
2026-05-29 16:22:45 -04:00
3 changed files with 91 additions and 33 deletions
+51 -32
View File
@@ -1,46 +1,65 @@
name: Docker Build and Push
on:
pull_request:
branches: [master]
push:
branches: [master]
branches: [master, main]
pull_request:
schedule:
- cron: '0 0 * * *'
- cron: '30 3 * * 3'
jobs:
build:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- uses: hadolint/hadolint-action@2332a7b74a6de0dda2e2221d575162eba76ba5e5 # v3.3.0
with:
dockerfile: Dockerfile
failure-threshold: error
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
build:
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: Build image
run: docker build -t ci-image:${{ github.sha }} .
- name: Save image
run: docker save ci-image:${{ github.sha }} -o image.tar
- uses: ChristopherHX/gitea-upload-artifact@62ac910c5d3dfa85c7cb2df15afe2e342b2407c2 # main
with:
name: docker-image
path: image.tar
- name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v4
test:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- uses: ChristopherHX/gitea-download-artifact@75635f32b4c1c41c4b3d64e8f85210112ed4c9c7 # main
with:
name: docker-image
- name: Load image
run: docker load < image.tar
- name: Run tests
run: bash tests/test.sh ci-image:${{ github.sha }}
push:
runs-on: ubuntu-latest
needs: test
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- uses: ChristopherHX/gitea-download-artifact@75635f32b4c1c41c4b3d64e8f85210112ed4c9c7 # main
with:
name: docker-image
- name: Load image
run: docker load < image.tar
- uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker metadata
id: meta
uses: docker/metadata-action@v6
with:
images: jcabillot/dynhost
tags: |
#type=ref,event=branch
#type=ref,event=pr
#type=sha
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }}
- name: Build and push
uses: docker/build-push-action@v7
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
pull: true
- name: Tag and push
run: |
docker tag ci-image:${{ github.sha }} jcabillot/docker-dynhost:latest
docker push jcabillot/docker-dynhost:latest
+2 -1
View File
@@ -1,5 +1,6 @@
FROM alpine:3
FROM alpine:3.24
# hadolint ignore=DL3018
RUN apk add --no-cache bind-tools curl
COPY entrypoint.sh /
+38
View File
@@ -0,0 +1,38 @@
#!/bin/bash
set -euo pipefail
IMAGE="$1"
FAILED=0
PASSED=0
TMPDIR="$(mktemp -d)"
trap 'rm -rf "$TMPDIR"' EXIT
assert_eq() {
local desc="$1" expected="$2" actual="$3"
if [ "$expected" = "$actual" ]; then
echo "PASS: $desc"
PASSED=$((PASSED + 1))
else
echo "FAIL: $desc (expected '$expected', got '$actual')"
FAILED=$((FAILED + 1))
fi
}
RC=0
docker run --rm "$IMAGE" dig -v > "$TMPDIR/output" 2>&1 || RC=$?
assert_eq "dig works" "0" "$RC"
if [ -s "$TMPDIR/output" ]; then
echo "PASS: Command produces output"
PASSED=$((PASSED + 1))
else
echo "FAIL: Command produces no output"
FAILED=$((FAILED + 1))
fi
echo ""
echo "$PASSED/$((PASSED + FAILED)) tests passed"
if [ "$FAILED" -gt 0 ]; then
exit 1
fi