Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
76560e76ec | ||
|
|
a7d51253a3 | ||
|
|
0ca7d70e56 | ||
|
|
4fffbd947d | ||
|
|
c0caf0f071 | ||
|
|
5aa89a78a1 | ||
|
|
707d6e3aba |
@@ -0,0 +1,45 @@
|
||||
name: Push Develop
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
- 'develop'
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: |
|
||||
${{ vars.DOCKERHUB_TARGET }}:develop
|
||||
|
||||
# for this project, we have a php image variant
|
||||
- name: Build php image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile.php
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: |
|
||||
${{ vars.DOCKERHUB_TARGET }}:develop-php
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
name: Push Docker
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*.*.*'
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: |
|
||||
${{ vars.DOCKERHUB_TARGET }}:latest
|
||||
${{ vars.DOCKERHUB_TARGET }}:${{ github.ref_name }}
|
||||
|
||||
# for this project, we have a php image variant
|
||||
- name: Build php image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile.php
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: |
|
||||
${{ vars.DOCKERHUB_TARGET }}:latest-php
|
||||
${{ vars.DOCKERHUB_TARGET }}:${{ github.ref_name }}-php
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
name: Sync GitHub
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Configure Git
|
||||
run: |
|
||||
git config --global user.name "Andrew Sync"
|
||||
git config --global user.email "sync@digitaladapt.com"
|
||||
|
||||
- name: Add GitHub Remote
|
||||
env:
|
||||
SYNC_TOKEN: ${{ secrets.SYNC_GITHUB_TOKEN }}
|
||||
SYNC_TARGET: ${{ vars.SYNC_GITHUB_TARGET }}
|
||||
run: |
|
||||
git remote add github "https://digitaladapt:${SYNC_TOKEN}@github.com/$SYNC_TARGET"
|
||||
|
||||
- name: Push Current Branch
|
||||
run: |
|
||||
git push github HEAD:${GITHUB_REF_NAME}
|
||||
|
||||
- name: Push Tags
|
||||
run: |
|
||||
git push github --tags
|
||||
|
||||
+5
-2
@@ -2,7 +2,10 @@ FROM alpine
|
||||
|
||||
RUN mkdir /tock
|
||||
WORKDIR /tock
|
||||
COPY . /tock/
|
||||
COPY ./crons /tock/
|
||||
COPY ./init.sh /tock/
|
||||
COPY ./license.txt /tock/
|
||||
COPY ./readme.md /tock/
|
||||
|
||||
RUN mkdir -p /tmp/tock
|
||||
|
||||
@@ -11,5 +14,5 @@ RUN touch /var/log/cron.log
|
||||
HEALTHCHECK --interval=60s --retries=3 --start-interval=1s --start-period=10s --timeout=5s \
|
||||
CMD ps | grep -v 'grep' | grep 'cron' || exit 1
|
||||
|
||||
ENTRYPOINT /tock/init.sh
|
||||
ENTRYPOINT ["/tock/init.sh"]
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# vim: set ft=dockerfile :
|
||||
FROM php:cli-alpine
|
||||
|
||||
RUN mkdir /tock
|
||||
WORKDIR /tock
|
||||
COPY ./crons-php /tock/crons
|
||||
COPY ./init.sh /tock/
|
||||
COPY ./license.txt /tock/
|
||||
COPY ./readme.md /tock/
|
||||
|
||||
RUN mkdir -p /tmp/tock
|
||||
|
||||
RUN touch /var/log/cron.log
|
||||
|
||||
HEALTHCHECK --interval=60s --retries=3 --start-interval=1s --start-period=10s --timeout=5s \
|
||||
CMD ps | grep -v 'grep' | grep 'cron' || exit 1
|
||||
|
||||
ENTRYPOINT ["/tock/init.sh"]
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
#m h dom mon dow command
|
||||
* * * * * php --run 'echo date("Y-m-d H:i:s\n");'
|
||||
|
||||
Reference in New Issue
Block a user