From 41f7f0eb06090df2f423b58e153ab312c3d512b6 Mon Sep 17 00:00:00 2001 From: Deon George Date: Sat, 6 Apr 2024 12:24:59 +1100 Subject: [PATCH] Added gitea CI/CD configuration --- .gitea/workflows/build_docker.yaml | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/.gitea/workflows/build_docker.yaml b/.gitea/workflows/build_docker.yaml index 8a8d364..668d9f3 100644 --- a/.gitea/workflows/build_docker.yaml +++ b/.gitea/workflows/build_docker.yaml @@ -56,11 +56,8 @@ jobs: run: | set -x 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 ${{ steps.registry.outputs.registry }}/${{ env.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} + echo docker build ${HTTP_PROXY:+--build-arg HTTP_PROXY=${HTTP_PROXY}} -t ${{ steps.registry.outputs.registry }}/${{ env.GITHUB_REPOSITORY }}:${{ env.VERSION }} + echo docker push ${{ steps.registry.outputs.registry }}/${{ env.GITHUB_REPOSITORY }}:${{ env.VERSION }} # name: Set up Docker Buildx # uses: https://github.com/docker/setup-buildx-action@v3 @@ -70,10 +67,10 @@ jobs: # http = true # insecure = true - #- name: Build and push Docker image - # uses: docker/build-push-action@v5 - # with: - # context: . - # file: ./Dockerfile - # push: true - # tags: "${{gitea.server}}/${{gitea.domain}}:latest" + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + file: ./Dockerfile + push: true + tags: "${{ steps.registry.outputs.registry }}/${{ env.GITHUB_REPOSITORY }}:${{ env.VERSION }}"