Adding cron to auto build every month
This commit is contained in:
1 parent
d104a54daf
commit
6e6c28fa6f
3 files changed
+35
-2
No files matched your search
@@ -1,6 +1,9 @@
|
|||||||
name: Build and Push Docker Image
|
name: Build and Push Docker Image
|
||||||
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 1 * *' # This runs at midnight on the first day of every month
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
@@ -20,8 +23,11 @@ jobs:
|
|||||||
password: ${{ secrets.DOCKER_TOKEN }}
|
password: ${{ secrets.DOCKER_TOKEN }}
|
||||||
|
|
||||||
- name: Build the Docker image
|
- name: Build the Docker image
|
||||||
run: docker build . -t k2patel/postfix:latest
|
id: build
|
||||||
|
run: |
|
||||||
|
docker build . -t k2patel/postfix:latest
|
||||||
|
echo "IMAGE_NAME=k2patel/postfix:latest" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Push the Docker image
|
- name: Push the Docker image
|
||||||
run: docker push k2patel/postfix
|
run: docker push ${{ env.IMAGE_NAME }}
|
||||||
|
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
services:
|
||||||
|
postfix:
|
||||||
|
container_name: postfix
|
||||||
|
image: docker.io/k2patel/postfix:latest
|
||||||
|
ports:
|
||||||
|
- "10825:25/tcp"
|
||||||
|
environment:
|
||||||
|
TIMEZONE: ${TIMEZONE}
|
||||||
|
SMTP_SERVER: ${SMTP_SERVER}
|
||||||
|
SERVER_HOSTNAME: ${SERVER_HOSTNAME}
|
||||||
|
SMTP_PORT: ${SMTP_PORT}
|
||||||
|
DOMAIN: ${DOMAIN}
|
||||||
|
SMTP_USERNAME: ${SMTP_USERNAME}
|
||||||
|
SMTP_PASSWORD: ${SMTP_PASSWORD}
|
||||||
|
volumes:
|
||||||
|
- "${DATA_FOLDER}/logs:/var/log"
|
||||||
|
- "${DATA_FOLDER}/mail:/var/mail"
|
||||||
|
- "${DATA_FOLDER}/spool:/var/spool/postfix"
|
||||||
|
restart: unless-stopped
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
TIMEZONE='America/New_York'
|
||||||
|
SMTP_SERVER='smtp.example.com'
|
||||||
|
SERVER_HOSTNAME=server_name
|
||||||
|
SMTP_PORT=587
|
||||||
|
DOMAIN=smtp_domain
|
||||||
|
SMTP_USERNAME=apikey
|
||||||
|
SMTP_PASSWORD='api_key'
|
||||||
|
DATA_FOLDER='Local data folder'
|
||||||
Reference in new issue
Block a user