new all workflow

This commit is contained in:
master of disaster
2026-06-12 09:08:13 +02:00
parent 9acf6a228b
commit 91cbd0a277
2 changed files with 42 additions and 30 deletions

View File

@@ -16,13 +16,18 @@ on:
jobs: jobs:
build: build:
# Runs in our custom ubuntu-act-runner image (Node 20 + Docker CLI + git) # Runs directly on runner host — buildah+skopeo available via tools volume
# Docker daemon is the DinD sidecar via DOCKER_HOST=tcp://localhost:2376 # No container spawned, no internet required in container
runs-on: ubuntu-latest runs-on: docker
steps: steps:
- name: 🔎 Checkout - name: 🔎 Checkout
uses: actions/checkout@v4 run: |
git clone \
--depth 1 \
--branch "${{ gitea.ref_name }}" \
"http://${{ secrets.REGISTRY_USER }}:${{ secrets.REGISTRY_PASSWORD }}@gitea.mod.home/ansible/ansible-runner.git" \
.
- name: 🏷️ Set Image Tags - name: 🏷️ Set Image Tags
id: tags id: tags
@@ -37,30 +42,34 @@ jobs:
echo "tag_sha=${REGISTRY}/${ORG}/${IMAGE}:${SHORT_SHA}" >> $GITHUB_OUTPUT echo "tag_sha=${REGISTRY}/${ORG}/${IMAGE}:${SHORT_SHA}" >> $GITHUB_OUTPUT
echo "short_sha=${SHORT_SHA}" >> $GITHUB_OUTPUT echo "short_sha=${SHORT_SHA}" >> $GITHUB_OUTPUT
- name: 🐳 Docker Login → Gitea Registry - name: 🔨 Build Image
run: |
echo "${{ secrets.REGISTRY_PASSWORD }}" | \
docker login gitea.mod.home \
--username "${{ secrets.REGISTRY_USER }}" \
--password-stdin
- name: 🐳 Build Image
run: | run: |
BUILD_ARGS="" BUILD_ARGS=""
if [ "${{ inputs.force_rebuild }}" = "true" ]; then if [ "${{ inputs.force_rebuild }}" = "true" ]; then
BUILD_ARGS="--no-cache" BUILD_ARGS="--no-cache"
fi fi
docker build ${BUILD_ARGS} \ buildah bud \
--storage-driver vfs \
${BUILD_ARGS} \
-t ${{ steps.tags.outputs.tag_latest }} \ -t ${{ steps.tags.outputs.tag_latest }} \
-t ${{ steps.tags.outputs.tag_sha }} \ -t ${{ steps.tags.outputs.tag_sha }} \
-f docker/Dockerfile \ -f docker/Dockerfile \
docker/ docker/
- name: 🐳 Push Image - name: 📤 Push Image → Gitea Registry
run: | run: |
docker push ${{ steps.tags.outputs.tag_latest }} skopeo copy \
docker push ${{ steps.tags.outputs.tag_sha }} --dest-tls-verify=false \
--dest-creds "${{ secrets.REGISTRY_USER }}:${{ secrets.REGISTRY_PASSWORD }}" \
containers-storage:${{ steps.tags.outputs.tag_latest }} \
docker://${{ steps.tags.outputs.tag_latest }}
skopeo copy \
--dest-tls-verify=false \
--dest-creds "${{ secrets.REGISTRY_USER }}:${{ secrets.REGISTRY_PASSWORD }}" \
containers-storage:${{ steps.tags.outputs.tag_sha }} \
docker://${{ steps.tags.outputs.tag_sha }}
- name: 📨 Telegram Notification - name: 📨 Telegram Notification
if: always() if: always()

View File

@@ -10,8 +10,8 @@ on:
jobs: jobs:
build: build:
# Bootstraps itself — runs on docker:host (no container spawned) # Runs directly on runner host — buildah+skopeo available via tools volume
# Docker CLI available via tools volume from initContainer # No container spawned, no internet required in container
runs-on: docker runs-on: docker
steps: steps:
@@ -36,25 +36,28 @@ jobs:
echo "tag_sha=${REGISTRY}/${ORG}/${IMAGE}:${SHORT_SHA}" >> $GITHUB_OUTPUT echo "tag_sha=${REGISTRY}/${ORG}/${IMAGE}:${SHORT_SHA}" >> $GITHUB_OUTPUT
echo "short_sha=${SHORT_SHA}" >> $GITHUB_OUTPUT echo "short_sha=${SHORT_SHA}" >> $GITHUB_OUTPUT
- name: 🐳 Docker Login → Gitea Registry - name: 🔨 Build Image
run: | run: |
echo "${{ secrets.REGISTRY_PASSWORD }}" | \ buildah bud \
docker login gitea.mod.home \ --storage-driver vfs \
--username "${{ secrets.REGISTRY_USER }}" \
--password-stdin
- name: 🐳 Build Image
run: |
docker build \
-t ${{ steps.tags.outputs.tag_latest }} \ -t ${{ steps.tags.outputs.tag_latest }} \
-t ${{ steps.tags.outputs.tag_sha }} \ -t ${{ steps.tags.outputs.tag_sha }} \
-f docker-ubuntu-latest/Dockerfile \ -f docker-ubuntu-latest/Dockerfile \
docker-ubuntu-latest/ docker-ubuntu-latest/
- name: 🐳 Push Image - name: 📤 Push Image → Gitea Registry
run: | run: |
docker push ${{ steps.tags.outputs.tag_latest }} skopeo copy \
docker push ${{ steps.tags.outputs.tag_sha }} --dest-tls-verify=false \
--dest-creds "${{ secrets.REGISTRY_USER }}:${{ secrets.REGISTRY_PASSWORD }}" \
containers-storage:${{ steps.tags.outputs.tag_latest }} \
docker://${{ steps.tags.outputs.tag_latest }}
skopeo copy \
--dest-tls-verify=false \
--dest-creds "${{ secrets.REGISTRY_USER }}:${{ secrets.REGISTRY_PASSWORD }}" \
containers-storage:${{ steps.tags.outputs.tag_sha }} \
docker://${{ steps.tags.outputs.tag_sha }}
- name: 📨 Telegram Notification - name: 📨 Telegram Notification
if: always() if: always()