diff options
| author | saturneric <[email protected]> | 2025-11-08 14:07:10 +0000 |
|---|---|---|
| committer | saturneric <[email protected]> | 2025-11-08 14:07:10 +0000 |
| commit | 43b567ad151c765845d1ec57cc902d254b8d1087 (patch) | |
| tree | 241825b1055323b540d85c6b5a24c9308ce96bbc | |
| parent | docs(guides): rewrite GPG fundamentals for clarity (diff) | |
| download | manual-43b567ad151c765845d1ec57cc902d254b8d1087.tar.gz manual-43b567ad151c765845d1ec57cc902d254b8d1087.zip | |
* Replace inline Docker build and push steps with a reusable workflow
* Simplify CI configuration and leverage centralized maintenance
* Pass registry credentials via secrets for secure authentication
| -rw-r--r-- | .gitea/workflows/ci.yaml | 45 |
1 files changed, 7 insertions, 38 deletions
diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index e4de8a1..4f026ee 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -8,41 +8,10 @@ on: [push] jobs: docker: runs-on: ubuntu-latest-server - steps: - # GitHub Actions do not automatically checkout your projects. If you need the code - # you need to check it out. - - name: Checkout - uses: https://git.stdv.de/Mirrors/[email protected] - - name: Prepare - id: prep - run: | - DOCKER_IMAGE=git.stdv.de/gpgfrontend/manual - VERSION=$(git rev-parse --short HEAD) - # Add timestamp for better versioning - TIMESTAMP=$(date +%Y%m%d%H%M%S) - TAGS="${DOCKER_IMAGE}:${VERSION}" - TAGS="$TAGS,${DOCKER_IMAGE}:${VERSION}-${TIMESTAMP}" - TAGS="$TAGS,${DOCKER_IMAGE}:latest" - echo "tags=${TAGS}" >> $GITHUB_OUTPUT - - - name: Set up Docker Buildx - id: buildx - uses: https://git.stdv.de/Mirrors/setup-buildx-action@v2 - - - name: Login to Gitea - if: github.event_name != 'pull_request' - uses: https://git.stdv.de/Mirrors/login-action@v2 - with: - registry: git.stdv.de - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Build & Push - id: docker_build - uses: https://git.stdv.de/Mirrors/build-push-action@v4 - with: - builder: ${{ steps.buildx.outputs.name }} - context: . - file: ./Dockerfile - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.prep.outputs.tags }} + uses: https://git.bktus.com/pub/workflows/.gitea/workflows/docker-build.yaml@main + with: + image: gpgfrontend/manual + registry: git.stdv.de + secrets: + REGISTRY_USER: ${{ secrets.DOCKER_USERNAME }} + REGISTRY_PASS: ${{ secrets.DOCKER_PASSWORD }} |
