From 035134f3b84a45169b76d37417c6743d38d24df6 Mon Sep 17 00:00:00 2001 From: Deon George Date: Sat, 6 Apr 2024 11:15:01 +1100 Subject: [PATCH] Added gitea CI/CD configuration --- .gitea/workflows/build_docker.yaml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/build_docker.yaml b/.gitea/workflows/build_docker.yaml index 7c6edb3..e4df6c3 100644 --- a/.gitea/workflows/build_docker.yaml +++ b/.gitea/workflows/build_docker.yaml @@ -34,6 +34,13 @@ jobs: - name: Checkout Code uses: actions/checkout@v4 + - name: Prepare Registry FQDN + id: registry + run: | + registry=${{ github.server_url }} + registry=${registry##http*://} + echo "registry=${registry}" >> "$GITHUB_OUTPUT" + - name: Environment part 2 run: | echo "++ Environment" && env|sort @@ -48,9 +55,9 @@ jobs: if [ -f init ]; then chmod 500 init; fi #([ -z "$REFRESH" -a -f build-cache/${CI_COMMIT_REF_SLUG} ]) && docker load < build-cache/${CI_COMMIT_REF_SLUG} || true #rm build-cache/* || true - docker build ${HTTP_PROXY:+--build-arg HTTP_PROXY=${HTTP_PROXY}} -t ${{ env.GITHUB_REPOSITORY }}:${{ env.VERSION }} - docker push ${CI_REGISTRY_IMAGE}:${VERSIONARCH} - docker save ${CI_REGISTRY_IMAGE}:${VERSIONARCH} > build-cache/${CI_COMMIT_REF_SLUG} + docker build ${HTTP_PROXY:+--build-arg HTTP_PROXY=${HTTP_PROXY}} -t ${{steps.registry.outputs.registry}}/${{ GITHUB_REPOSITORY }}:${{ env.VERSION }} + docker push ${{steps.registry.outputs.registry}}/${{ GITHUB_REPOSITORY }}:${{ env.VERSION }} + #docker save ${CI_REGISTRY_IMAGE}:${VERSIONARCH} > build-cache/${CI_COMMIT_REF_SLUG} # name: Set up Docker Buildx # uses: https://github.com/docker/setup-buildx-action@v3