Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run scheduled builds every week #676

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/continuous_delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@ jobs:
uses: docker/setup-buildx-action@v2
- name: Checkout source code
uses: actions/checkout@v3
- name: Get the latest minor release tag
id: latest_minor_release_tag
run: |
# Split the tag into major, minor, patch
IFS='.' read -ra VERSION_PARTS <<< "${{ github.event.release.tag_name }}"

# Construct the tag
NEW_TAG="${VERSION_PARTS[0]}.${VERSION_PARTS[1]}"

# Set the tag as an output
echo "::set-output name=tag::$NEW_TAG"
- name: Log in to Docker Hub Container Registry
uses: docker/login-action@v2
with:
Expand All @@ -25,3 +36,5 @@ jobs:
run: |
make release GOTENBERG_VERSION=${{ github.event.release.tag_name }}
make release GOTENBERG_VERSION=${{ github.event.release.tag_name }} DOCKER_REPOSITORY=thecodingmachine
make release GOTENBERG_VERSION=${{ steps.latest_minor_release_tag.outputs.tag }}
make release GOTENBERG_VERSION=${{ steps.latest_minor_release_tag.outputs.tag }} DOCKER_REPOSITORY=thecodingmachine
41 changes: 41 additions & 0 deletions .github/workflows/weekly_updates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Weekly Docker Image Builds

on:
schedule:
- cron: '0 0 * * 0' # every sunday at midnight

jobs:

release:
name: Release Docker image
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Checkout source code
uses: actions/checkout@v3
- name: Get the latest minor release tag
id: latest_minor_release_tag
run: |
# Get the latest released tag
LATEST_TAG=$(curl -s "https://api.github.com/repos/${{ github.repository }}/releases/latest" | jq -r '.tag_name')

# Split the tag into major, minor, patch
IFS='.' read -ra VERSION_PARTS <<< $LATEST_TAG

# Construct the tag
NEW_TAG="${VERSION_PARTS[0]}.${VERSION_PARTS[1]}"

# Set the tag as an output
echo "::set-output name=tag::$NEW_TAG"
- name: Log in to Docker Hub Container Registry
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
run: |
make release GOTENBERG_VERSION=${{ steps.latest_minor_release_tag.outputs.tag }}
make release GOTENBERG_VERSION=${{ steps.latest_minor_release_tag.outputs.tag }} DOCKER_REPOSITORY=thecodingmachine