Skip to content

feat: enhance configuration saving with detailed permission error log… #79

feat: enhance configuration saving with detailed permission error log…

feat: enhance configuration saving with detailed permission error log… #79

Workflow file for this run

name: snd
on:
push:
branches:
- "snd"
paths-ignore:
- '*.md'
- 'images/**'
jobs:
build:
runs-on: self-hosted
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: snd
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Cache pip packages
# Skip cache for self-hosted runners (files persist locally)
if: ${{ runner.name != 'git01' }}
uses: actions/cache@v4
with:
path: |
~/.cache/pip
/root/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache Docker layers
# Skip GitHub Actions cache for self-hosted runners (files persist locally)
if: ${{ runner.name != 'git01' }}
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-snd-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-snd-
${{ runner.os }}-buildx-
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ vars.DOCKERHUB_USERNAME }}/simpleclouddetect:snd
cache-from: type=local,src=/tmp/.buildx-cache
# OPTIMIZATION: Changed mode=max to mode=min to speed up export on self-hosted runners
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=min
platforms: linux/amd64,linux/arm64
- name: Move cache
if: always()
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
- name: Get image size
run: |
docker pull ${{ vars.DOCKERHUB_USERNAME }}/simpleclouddetect:snd
IMAGE_SIZE=$(docker images --format "{{.Size}}" ${{ vars.DOCKERHUB_USERNAME }}/simpleclouddetect:snd | head -n1)
echo "Docker image size: $IMAGE_SIZE"