Loading .gitea/workflows/build.yamldeleted 100644 → 0 +0 −67 Original line number Diff line number Diff line --- # generic name: 'Build and Publish' on: push: branches: - 'main' # build job jobs: # build container Build: runs-on: 'ubuntu-latest' steps: # checkout code - name: 'Clone repo' uses: 'actions/checkout@v4' # login to cr.simoncor.net - name: 'Login to cr.simoncor.net' uses: 'docker/login-action@v3' with: registry: 'cr.simoncor.net' username: ${{ vars.REGISTER_USERNAME }} password: ${{ vars.REGISTER_PASSWORD }} # build and publish container - name: 'Build and Publish' uses: 'docker/build-push-action@v6' with: context: '.' file: 'Dockerfile.linux.amd64' push: true tags: | cr.simoncor.net/siempie/roundcube:latest cr.simoncor.net/siempie/roundcube:v1 # ansible deployment Deployment: runs-on: 'ubuntu-latest' needs: 'Build' steps: # ansible deployment - name: 'Ansible deployment' uses: 'appleboy/ssh-action@v1.1.0' with: # bastion proxy_host: 'bastion.siempie.com' proxy_port: '22' proxy_username: ${{ secrets.USERNAME }} proxy_key: ${{ secrets.SSHKEY }} # ansible management host: 'ansible.siempie.internal' port: '22' username: ${{ secrets.USERNAME }} key: ${{ secrets.SSHKEY }} # command script: | sudo /usr/local/bin/ansible-playbook /etc/ansible/playbooks/production/roundcube.yaml .gitlab-ci.yml 0 → 100644 +32 −0 Original line number Diff line number Diff line --- variables: DOCKER_DRIVER: "overlay2" DOCKER_HOST: "tcp://localhost:2375/" DOCKER_TLS_CERTDIR: "" stages: - "build" build image: stage: "build" image: "docker" services: - name: "docker:dind" command: ["--tls=false"] script: # login to container registry - echo "$CR_PASSWORD" | docker login $CR_HOSTNAME -u $CR_USERNAME --password-stdin # build observium-pe image - "docker build -t roundcube -f Dockerfile.linux.amd64 ." # add tags to image - "docker image tag roundcube cr.simoncor.net/siempie/roundcube:latest" # push image to dockerhub. - "docker push --all-tags cr.simoncor.net/siempie/roundcube" # logout from container registry - "docker logout $CR_HOSTNAME" Dockerfile.linux.amd64 +0 −4 Original line number Diff line number Diff line # use latest roundcubemail container FROM docker.io/roundcube/roundcubemail:1.6.9-apache # build cache date argument trick ARG GITEA_SHA=some_sha RUN echo $GITEA_SHA # prepare basic stuff RUN set -e && ln -sf bash /bin/sh RUN set -e \ Loading Loading
.gitea/workflows/build.yamldeleted 100644 → 0 +0 −67 Original line number Diff line number Diff line --- # generic name: 'Build and Publish' on: push: branches: - 'main' # build job jobs: # build container Build: runs-on: 'ubuntu-latest' steps: # checkout code - name: 'Clone repo' uses: 'actions/checkout@v4' # login to cr.simoncor.net - name: 'Login to cr.simoncor.net' uses: 'docker/login-action@v3' with: registry: 'cr.simoncor.net' username: ${{ vars.REGISTER_USERNAME }} password: ${{ vars.REGISTER_PASSWORD }} # build and publish container - name: 'Build and Publish' uses: 'docker/build-push-action@v6' with: context: '.' file: 'Dockerfile.linux.amd64' push: true tags: | cr.simoncor.net/siempie/roundcube:latest cr.simoncor.net/siempie/roundcube:v1 # ansible deployment Deployment: runs-on: 'ubuntu-latest' needs: 'Build' steps: # ansible deployment - name: 'Ansible deployment' uses: 'appleboy/ssh-action@v1.1.0' with: # bastion proxy_host: 'bastion.siempie.com' proxy_port: '22' proxy_username: ${{ secrets.USERNAME }} proxy_key: ${{ secrets.SSHKEY }} # ansible management host: 'ansible.siempie.internal' port: '22' username: ${{ secrets.USERNAME }} key: ${{ secrets.SSHKEY }} # command script: | sudo /usr/local/bin/ansible-playbook /etc/ansible/playbooks/production/roundcube.yaml
.gitlab-ci.yml 0 → 100644 +32 −0 Original line number Diff line number Diff line --- variables: DOCKER_DRIVER: "overlay2" DOCKER_HOST: "tcp://localhost:2375/" DOCKER_TLS_CERTDIR: "" stages: - "build" build image: stage: "build" image: "docker" services: - name: "docker:dind" command: ["--tls=false"] script: # login to container registry - echo "$CR_PASSWORD" | docker login $CR_HOSTNAME -u $CR_USERNAME --password-stdin # build observium-pe image - "docker build -t roundcube -f Dockerfile.linux.amd64 ." # add tags to image - "docker image tag roundcube cr.simoncor.net/siempie/roundcube:latest" # push image to dockerhub. - "docker push --all-tags cr.simoncor.net/siempie/roundcube" # logout from container registry - "docker logout $CR_HOSTNAME"
Dockerfile.linux.amd64 +0 −4 Original line number Diff line number Diff line # use latest roundcubemail container FROM docker.io/roundcube/roundcubemail:1.6.9-apache # build cache date argument trick ARG GITEA_SHA=some_sha RUN echo $GITEA_SHA # prepare basic stuff RUN set -e && ln -sf bash /bin/sh RUN set -e \ Loading