Added gitea CI/CD configuration

This commit is contained in:
Deon George 2024-04-06 10:50:49 +11:00
parent 0908fc77c4
commit dd37748bf0

View File

@ -33,12 +33,15 @@ jobs:
- name: Checkout Code - name: Checkout Code
uses: actions/checkout@v4 uses: actions/checkout@v4
run: echo "Checked out ${{ gitea.repository }}"
- name: Environment part 2 - name: Environment part 2
run: | run: |
echo "++ Environment" && env|sort echo "++ Environment" && env|sort
echo "++ PWD" && pwd echo "++ PWD" && pwd
echo "++ ls" && ls -al echo "++ ls" && ls -al
echo "++ workspace" && ls ${{ gitea.workspace }}
echo "++ host is ${{ gitea.host }}"
- name: Build - name: Build
run: | run: |
@ -46,7 +49,7 @@ jobs:
if [ -f init ]; then chmod 500 init; fi 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 #([ -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 ${CI_REGISTRY_IMAGE}:${VERSIONARCH} . docker build ${HTTP_PROXY:+--build-arg HTTP_PROXY=${HTTP_PROXY}} -t ${{ env.GITHUB_REPOSITORY }}:{{ $env.VERSION }}
docker push ${CI_REGISTRY_IMAGE}:${VERSIONARCH} docker push ${CI_REGISTRY_IMAGE}:${VERSIONARCH}
docker save ${CI_REGISTRY_IMAGE}:${VERSIONARCH} > build-cache/${CI_COMMIT_REF_SLUG} docker save ${CI_REGISTRY_IMAGE}:${VERSIONARCH} > build-cache/${CI_COMMIT_REF_SLUG}