diff --git a/.github/workflows/container-build.yml b/.github/workflows/container-build.yml index e148d7e..8d41af3 100644 --- a/.github/workflows/container-build.yml +++ b/.github/workflows/container-build.yml @@ -25,13 +25,17 @@ jobs: - name: Prepare Registry Environment id: prep run: | + # 1. Dynamic Registry Detection + # This reads the Gitea ROOT_URL automatically. if [[ "${{ github.server_url }}" == *"github.com"* ]]; then echo "REGISTRY=ghcr.io" >> $GITHUB_ENV else - # Strip protocol (http/https) to get just the hostname:port + # Strips 'https://' and path to get 'gitea.service.dc1.fbleagh.duckdns.org' CLEAN_HOST=$(echo "${{ github.server_url }}" | sed -e 's|^[^/]*//||' -e 's|/.*$||') echo "REGISTRY=$CLEAN_HOST" >> $GITHUB_ENV fi + + # 2. Lowercase Image Name IMAGE_NAME=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]') echo "IMAGE_NAME=$IMAGE_NAME" >> $GITHUB_ENV @@ -42,14 +46,10 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - # UPDATED STEP: Allow HTTP/Insecure registry - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - with: - buildkitd-config-inline: | - [registry."${{ env.REGISTRY }}"] - http = true - insecure = true + # NOTE: "http = true" block removed because you are now on SSL. + # If your certificate is valid, you don't need any config here. - name: Build and push multi-arch Docker image uses: docker/build-push-action@v5