-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added automatic image build & pushing on commits involving key files …
…to the dev tag. Also cleaned up other GitHub Action workflows
- Loading branch information
1 parent
3221cce
commit 4f0a4cb
Showing
3 changed files
with
52 additions
and
1 deletion.
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,46 @@ | ||
name: Build and Push Image to DockerHub | ||
# Automatically builds and pushes a multi-platform dev image based on commits involving key files | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'empty_library/**' | ||
- 'root/**' | ||
- 'scripts/**' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: DockerHub Login | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PA_TOKEN }} | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
push: true | ||
build-args: | | ||
BUILD_DATE=${{ github.event.repository.updated_at }} | ||
VERSION=${{ vars.CURRENT_DEV_VERSION }}-DEV_BUILD-${{ vars.CURRENT_DEV_BUILD_NUM }} | ||
tags: | | ||
${{ secrets.DOCKERHUB_USERNAME }}/calibre-web-automated:dev | ||
platforms: linux/amd64,linux/arm64 | ||
|
||
- name: Increment dev build number | ||
uses: action-pack/increment@v2 | ||
id: increment | ||
with: | ||
name: 'CURRENT_DEV_BUILD_NUM' | ||
token: ${{ secrets.DEV_BUILD_NUM_INCREMENTOR_TOKEN }} |
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