-
Notifications
You must be signed in to change notification settings - Fork 469
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
only uodate minor versions on schedule
- Loading branch information
Showing
2 changed files
with
55 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |