diff --git a/.github/workflows/.github-ci.yaml b/.github/workflows/.github-ci.yaml index 4cc259f..7304c5d 100644 --- a/.github/workflows/.github-ci.yaml +++ b/.github/workflows/.github-ci.yaml @@ -3,26 +3,35 @@ name: ci on: push jobs: - build: - runs-on: ubuntu-22.04 - + docker: + runs-on: docker + steps: - - - name: Login to Docker Hub - uses: docker/login-action@v3 + - name: Checkout + uses: actions/checkout@v4 with: - registry: gitea.client.c-one-infra.de - username: ${{ github.repository }} - password: ${{ secrets.PACKAGES_TOKEN }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Build and push - uses: docker/build-push-action@v6 + submodules: recursive + + - name: Repository meta + id: repository + run: | + registry=${{ github.server_url }} + registry=${registry##http*://} + echo "registry=${registry}" >> "$GITHUB_OUTPUT" + repository="$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')" + echo "repository=${repository}" >> "$GITHUB_OUTPUT" + + - name: Docker meta + uses: docker/metadata-action@v5 + id: docker with: + images: ${{ steps.repository.outputs.registry }}/${{ steps.repository.outputs.repository }} + + - name: Build and push + uses: https://codeberg.org/umglurf/kaniko-action@main + with: + credentials: | + ${{ steps.repository.outputs.registry }}=${{ github.repository }}:${{ secrets.PACKAGES_TOKEN }} + destinations: | + ${{ steps.docker.outputs.tags }} push: true - tags: gitea.client.c-one-infra.de/giteaadmin/app:latest \ No newline at end of file