diff --git a/.gitea/workflows/cicd.yaml b/.gitea/workflows/cicd.yaml new file mode 100644 index 0000000..ea30bac --- /dev/null +++ b/.gitea/workflows/cicd.yaml @@ -0,0 +1,34 @@ +name: CICD +run-name: ${{ gitea.actor }} triggered CICD +on: [push] + +jobs: + Explore-Gitea-Actions: + runs-on: ubuntu-latest + steps: + - name: Build Dockerfile + run: | + export BUILDIMGTAG="`cat Dockerfile | tail -n1 | sed 's/^.*\///g'`" + docker build -t $BUILDIMGTAG . + docker images + - name: Tag and Push (Harbor) + run: | + export BUILDIMGTAG="`cat Dockerfile | tail -n1 | sed 's/^.*\///g'`" + export FINALBUILDTAG="`cat Dockerfile | tail -n1 | sed 's/^#//g'`" + docker tag $BUILDIMGTAG $FINALBUILDTAG + docker images + echo $CR_PAT | docker login harbor.freshbrewed.science -u $CR_USER --password-stdin + docker push $FINALBUILDTAG + env: # Or as an environment variable + CR_PAT: ${{ secrets.CR_PAT }} + CR_USER: ${{ secrets.CR_USER }} + - name: Tag and Push (Dockerhub) + run: | + export BUILDIMGTAG="`cat Dockerfile | tail -n1 | sed 's/^.*\///g'`" + docker tag $BUILDIMGTAG $DHUSER/$BUILDIMGTAG + docker images + echo $DHPAT | docker login -u $DHUSER --password-stdin + docker push $DHUSER/$BUILDIMGTAG + env: # Or as an environment variable + DHPAT: ${{ secrets.DHPAT }} + DHUSER: ${{ secrets.DHUSER }} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 01ec77e..9197ece 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,4 +19,5 @@ RUN pip install --no-cache-dir -r requirements.txt COPY . . -CMD ["python", "main.py"] \ No newline at end of file +CMD ["python", "main.py"] +#harbor.freshbrewed.science/library/vikunjamcp:0.10 \ No newline at end of file