add Gitea container delivery
Test, Build and Push Container Image / build (push) Failing after 1m28s
Test, Build and Push Container Image / build (push) Failing after 1m28s
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
name: Test, Build and Push Container Image
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
concurrency:
|
||||
group: container-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
REGISTRY: git.felixfoertsch.de
|
||||
IMAGE: felixfoertsch/ios-advanced-parental-controls
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Test backend
|
||||
run: |
|
||||
python3 -m venv .venv
|
||||
.venv/bin/pip install -r backend/requirements-dev.txt
|
||||
.venv/bin/pytest -c backend/pyproject.toml backend/tests
|
||||
|
||||
- name: Check dashboard JavaScript
|
||||
run: node --check backend/src/apc/static/app.js
|
||||
|
||||
- name: Log in to Gitea Container Registry
|
||||
run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login "$REGISTRY" -u "${{ github.actor }}" --password-stdin
|
||||
|
||||
- name: Build and push image
|
||||
run: |
|
||||
docker buildx create --use --name ci-builder --driver docker-container || docker buildx use ci-builder
|
||||
docker buildx build \
|
||||
--platform linux/amd64 \
|
||||
--push \
|
||||
--cache-from "type=registry,ref=$REGISTRY/$IMAGE:buildcache" \
|
||||
--cache-to "type=registry,ref=$REGISTRY/$IMAGE:buildcache,mode=max" \
|
||||
-t "$REGISTRY/$IMAGE:latest" \
|
||||
-t "$REGISTRY/$IMAGE:sha-${GITHUB_SHA}" \
|
||||
.
|
||||
|
||||
- name: Prune local BuildKit cache
|
||||
if: always()
|
||||
run: |
|
||||
if docker buildx use ci-builder; then
|
||||
docker buildx prune --builder ci-builder --all --force --max-used-space 10gb
|
||||
fi
|
||||
Reference in New Issue
Block a user