Added gitea CI/CD configuration
Create Docker Image / Build Docker Image (push) Successful in 10s Details

This commit is contained in:
Deon George 2024-04-06 11:58:42 +11:00
parent 8ef29c698f
commit 67189cb36a
1 changed files with 9 additions and 9 deletions

View File

@ -50,7 +50,7 @@ jobs:
echo "++ host is ${{ gitea.repository }}" echo "++ host is ${{ gitea.repository }}"
echo "++ registry is ${{ steps.registry.outputs.registry }}" echo "++ registry is ${{ steps.registry.outputs.registry }}"
echo "++ container ${{ steps.registry.outputs.registry }}/${{ env.GITHUB_REPOSITORY }}:${{ env.VERSION }}" echo "++ container ${{ steps.registry.outputs.registry }}/${{ env.GITHUB_REPOSITORY }}:${{ env.VERSION }}"
echo "++ gitea server/domain ${{gitea.server}}/${{gitea.domain}}:latest" echo "++ gitea server/domain ${{ gitea.server }}/${{ gitea.domain }}:latest"
- name: Build - name: Build
run: | run: |
@ -59,7 +59,7 @@ jobs:
#([ -z "$REFRESH" -a -f build-cache/${CI_COMMIT_REF_SLUG} ]) && docker load < build-cache/${CI_COMMIT_REF_SLUG} || true #([ -z "$REFRESH" -a -f build-cache/${CI_COMMIT_REF_SLUG} ]) && docker load < build-cache/${CI_COMMIT_REF_SLUG} || true
#rm build-cache/* || 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 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 push ${{ steps.registry.outputs.registry }}/${{ GITHUB_REPOSITORY }}:${{ env.VERSION }}
#docker save ${CI_REGISTRY_IMAGE}:${VERSIONARCH} > build-cache/${CI_COMMIT_REF_SLUG} #docker save ${CI_REGISTRY_IMAGE}:${VERSIONARCH} > build-cache/${CI_COMMIT_REF_SLUG}
# name: Set up Docker Buildx # name: Set up Docker Buildx
@ -70,10 +70,10 @@ jobs:
# http = true # http = true
# insecure = true # insecure = true
- name: Build and push Docker image #- name: Build and push Docker image
uses: docker/build-push-action@v5 # uses: docker/build-push-action@v5
with: # with:
context: . # context: .
file: ./Dockerfile # file: ./Dockerfile
push: true # push: true
tags: "${{gitea.server}}/${{gitea.domain}}:latest" # tags: "${{gitea.server}}/${{gitea.domain}}:latest"