git subrepo commit mailcow/src/mailcow-dockerized
subrepo: subdir: "mailcow/src/mailcow-dockerized"
merged: "308860af"
upstream: origin: "https://github.com/mailcow/mailcow-dockerized.git"
branch: "master"
commit: "3f1a5af8"
git-subrepo: version: "0.4.5"
origin: "???"
commit: "???"
Change-Id: I5d51c14b45db54fe706be40a591ddbfcea50d4b0
diff --git a/mailcow/src/mailcow-dockerized/.github/workflows/assets/check_prs_if_on_staging.png b/mailcow/src/mailcow-dockerized/.github/workflows/assets/check_prs_if_on_staging.png
new file mode 100644
index 0000000..2e0fc7f
--- /dev/null
+++ b/mailcow/src/mailcow-dockerized/.github/workflows/assets/check_prs_if_on_staging.png
Binary files differ
diff --git a/mailcow/src/mailcow-dockerized/.github/workflows/check_prs_if_on_staging.yml b/mailcow/src/mailcow-dockerized/.github/workflows/check_prs_if_on_staging.yml
new file mode 100644
index 0000000..cb49ffb
--- /dev/null
+++ b/mailcow/src/mailcow-dockerized/.github/workflows/check_prs_if_on_staging.yml
@@ -0,0 +1,33 @@
+name: Check PRs if on staging
+on:
+ pull_request_target:
+ types: [opened, edited]
+permissions: {}
+
+jobs:
+ is_not_staging:
+ runs-on: ubuntu-latest
+ if: github.event.pull_request.base.ref != 'staging' #check if the target branch is not staging
+ steps:
+ - name: Send message
+ uses: thollander/actions-comment-pull-request@main
+ with:
+ GITHUB_TOKEN: ${{ secrets.CHECKIFPRISSTAGING_ACTION_PAT }}
+ message: |
+ Thanks for contributing!
+
+ I noticed that you didn't select `staging` as your base branch. Please change the base branch to `staging`.
+ See the attached picture on how to change the base branch to `staging`:
+
+ ![check_prs_if_on_staging.png](https://raw.githubusercontent.com/mailcow/mailcow-dockerized/master/.github/workflows/assets/check_prs_if_on_staging.png)
+
+ - name: Fail #we want to see failed checks in the PR
+ if: ${{ success() }} #set exit code to 1 even if commenting somehow failed
+ run: exit 1
+
+ is_staging:
+ runs-on: ubuntu-latest
+ if: github.event.pull_request.base.ref == 'staging' #check if the target branch is staging
+ steps:
+ - name: Success
+ run: exit 0
diff --git a/mailcow/src/mailcow-dockerized/.github/workflows/close_old_issues_and_prs.yml b/mailcow/src/mailcow-dockerized/.github/workflows/close_old_issues_and_prs.yml
index cfb3603..83a75d2 100644
--- a/mailcow/src/mailcow-dockerized/.github/workflows/close_old_issues_and_prs.yml
+++ b/mailcow/src/mailcow-dockerized/.github/workflows/close_old_issues_and_prs.yml
@@ -14,7 +14,7 @@
pull-requests: write
steps:
- name: Mark/Close Stale Issues and Pull Requests 🗑️
- uses: actions/stale@v4
+ uses: actions/stale@v6.0.1
with:
repo-token: ${{ secrets.STALE_ACTION_PAT }}
days-before-stale: 60
@@ -25,10 +25,12 @@
stale-pr-message: >
This pull request has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs.
- exempt-issue-labels: "pinned,security,enhancement,investigating"
- exempt-pr-labels: "pinned,security,enhancement,investigating"
+ exempt-issue-labels: "pinned,security,enhancement,investigating,neverstale"
+ exempt-pr-labels: "pinned,security,enhancement,investigating,neverstale"
stale-issue-label: "stale"
stale-pr-label: "stale"
+ exempt-draft-pr: "true"
+ close-issue-reason: "not_planned"
operations-per-run: "250"
ascending: "true"
#DRY-RUN
diff --git a/mailcow/src/mailcow-dockerized/.github/workflows/image_builds.yml b/mailcow/src/mailcow-dockerized/.github/workflows/image_builds.yml
new file mode 100644
index 0000000..65678df
--- /dev/null
+++ b/mailcow/src/mailcow-dockerized/.github/workflows/image_builds.yml
@@ -0,0 +1,43 @@
+name: Build mailcow Docker Images
+
+on:
+ push:
+ branches: [ "master", "staging" ]
+ workflow_dispatch:
+
+permissions:
+ contents: read # to fetch code (actions/checkout)
+
+jobs:
+ docker_image_builds:
+ strategy:
+ matrix:
+ images:
+ - "acme-mailcow"
+ - "clamd-mailcow"
+ - "dockerapi-mailcow"
+ - "dovecot-mailcow"
+ - "netfilter-mailcow"
+ - "olefy-mailcow"
+ - "php-fpm-mailcow"
+ - "postfix-mailcow"
+ - "rspamd-mailcow"
+ - "sogo-mailcow"
+ - "solr-mailcow"
+ - "unbound-mailcow"
+ - "watchdog-mailcow"
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - name: Setup Docker
+ run: |
+ curl -sSL https://get.docker.com/ | CHANNEL=stable sudo sh
+ sudo service docker start
+ - name: Prepair Image Builds
+ run: |
+ cp helper-scripts/docker-compose.override.yml.d/BUILD_FLAGS/docker-compose.override.yml docker-compose.override.yml
+ - name: Build Docker Images
+ run: |
+ docker compose build ${image}
+ env:
+ image: ${{ matrix.images }}
diff --git a/mailcow/src/mailcow-dockerized/.github/workflows/integration_tests.yml b/mailcow/src/mailcow-dockerized/.github/workflows/integration_tests.yml
new file mode 100644
index 0000000..ee083bf
--- /dev/null
+++ b/mailcow/src/mailcow-dockerized/.github/workflows/integration_tests.yml
@@ -0,0 +1,63 @@
+name: mailcow Integration Tests
+
+on:
+ push:
+ branches: [ "master", "staging" ]
+ workflow_dispatch:
+
+permissions:
+ contents: read
+
+jobs:
+ integration_tests:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Setup Ansible
+ run: |
+ export DEBIAN_FRONTEND=noninteractive
+ sudo apt-get update
+ sudo apt-get install python3 python3-pip git
+ sudo pip3 install ansible
+ - name: Prepair Test Environment
+ run: |
+ git clone https://github.com/mailcow/mailcow-integration-tests.git --branch $(curl -sL https://api.github.com/repos/mailcow/mailcow-integration-tests/releases/latest | jq -r '.tag_name') --single-branch .
+ ./fork_check.sh
+ ./ci.sh
+ ./ci-pip-requirements.sh
+ env:
+ VAULT_PW: ${{ secrets.MAILCOW_TESTS_VAULT_PW }}
+ VAULT_FILE: ${{ secrets.MAILCOW_TESTS_VAULT_FILE }}
+ - name: Start Integration Test Server
+ run: |
+ ./fork_check.sh
+ ansible-playbook mailcow-start-server.yml --diff
+ env:
+ PY_COLORS: '1'
+ ANSIBLE_FORCE_COLOR: '1'
+ ANSIBLE_HOST_KEY_CHECKING: 'false'
+ - name: Setup Integration Test Server
+ run: |
+ ./fork_check.sh
+ sleep 30
+ ansible-playbook mailcow-setup-server.yml --private-key id_ssh_rsa --diff
+ env:
+ PY_COLORS: '1'
+ ANSIBLE_FORCE_COLOR: '1'
+ ANSIBLE_HOST_KEY_CHECKING: 'false'
+ - name: Run Integration Tests
+ run: |
+ ./fork_check.sh
+ ansible-playbook mailcow-integration-tests.yml --private-key id_ssh_rsa --diff
+ env:
+ PY_COLORS: '1'
+ ANSIBLE_FORCE_COLOR: '1'
+ ANSIBLE_HOST_KEY_CHECKING: 'false'
+ - name: Delete Integration Test Server
+ if: always()
+ run: |
+ ./fork_check.sh
+ ansible-playbook mailcow-delete-server.yml --diff
+ env:
+ PY_COLORS: '1'
+ ANSIBLE_FORCE_COLOR: '1'
+ ANSIBLE_HOST_KEY_CHECKING: 'false'
diff --git a/mailcow/src/mailcow-dockerized/.github/workflows/pr_to_nightly.yml b/mailcow/src/mailcow-dockerized/.github/workflows/pr_to_nightly.yml
new file mode 100644
index 0000000..54dbda3
--- /dev/null
+++ b/mailcow/src/mailcow-dockerized/.github/workflows/pr_to_nightly.yml
@@ -0,0 +1,25 @@
+name: Create PR to merge to nightly from staging
+on:
+ push:
+ branches:
+ - staging
+jobs:
+ action-pull-request:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+ - name: Run the Action
+ uses: devops-infra/action-pull-request@v0.5.3
+ with:
+ github_token: ${{ secrets.PRTONIGHTLY_ACTION_PAT }}
+ title: Automatic PR to nightly from ${{ github.event.repository.updated_at}}
+ assignee: DerLinkman
+ source_branch: staging
+ target_branch: nightly
+ reviewer: DerLinkman
+ label: upstream
+ template: .github/ISSUE_TEMPLATE/pr_to_nighty_template.yml
+ get_diff: true
diff --git a/mailcow/src/mailcow-dockerized/.github/workflows/rebuild_backup_image.yml b/mailcow/src/mailcow-dockerized/.github/workflows/rebuild_backup_image.yml
new file mode 100644
index 0000000..120d68d
--- /dev/null
+++ b/mailcow/src/mailcow-dockerized/.github/workflows/rebuild_backup_image.yml
@@ -0,0 +1,34 @@
+name: Build mailcow backup image
+
+on:
+ schedule:
+ # At 00:00 on Sunday
+ - cron: "0 0 * * 0"
+ workflow_dispatch: # Allow to run workflow manually
+
+jobs:
+ docker_image_build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+
+ - name: Set up QEMU
+ uses: docker/setup-qemu-action@v2
+
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v2
+
+ - name: Login to Docker Hub
+ uses: docker/login-action@v2
+ with:
+ username: ${{ secrets.BACKUPIMAGEBUILD_ACTION_DOCKERHUB_USERNAME }}
+ password: ${{ secrets.BACKUPIMAGEBUILD_ACTION_DOCKERHUB_TOKEN }}
+
+ - name: Build and push
+ uses: docker/build-push-action@v3
+ with:
+ context: .
+ file: data/Dockerfiles/backup/Dockerfile
+ push: true
+ tags: mailcow/backup:latest
diff --git a/mailcow/src/mailcow-dockerized/.github/workflows/tweet-trigger-publish-release.yml b/mailcow/src/mailcow-dockerized/.github/workflows/tweet-trigger-publish-release.yml
new file mode 100644
index 0000000..86cf628
--- /dev/null
+++ b/mailcow/src/mailcow-dockerized/.github/workflows/tweet-trigger-publish-release.yml
@@ -0,0 +1,20 @@
+name: "Tweet trigger release"
+on:
+ release:
+ types: [published]
+
+jobs:
+ tweet:
+ runs-on: ubuntu-latest
+ steps:
+ - name: "Get Release Tag"
+ run: |
+ RELEASE_TAG=$(curl https://api.github.com/repos/mailcow/mailcow-dockerized/releases/latest | jq -r '.tag_name')
+ - name: Tweet-trigger-publish-release
+ uses: mugi111/tweet-trigger-release@v1.1
+ with:
+ consumer_key: ${{ secrets.CONSUMER_KEY }}
+ consumer_secret: ${{ secrets.CONSUMER_SECRET }}
+ access_token_key: ${{ secrets.ACCESS_TOKEN_KEY }}
+ access_token_secret: ${{ secrets.ACCESS_TOKEN_SECRET }}
+ tweet_body: 'A new mailcow update has just been released! Checkout the GitHub Page for changelog and more informations: https://github.com/mailcow/mailcow-dockerized/releases/latest'