-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add reusable actions to build and push images to Docker Hub
As discussed in ckan/ckan#8143 TODO: Decide when to trigger the builds
- Loading branch information
Showing
7 changed files
with
121 additions
and
33 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: Build and push CKAN 2.10 images (python) | ||
|
||
on: push | ||
|
||
jobs: | ||
call-reusable-workflow: | ||
uses: ./.github/workflows/reusable-docker-publish.yml | ||
with: | ||
ckan-major-version: "2.10" | ||
ckan-version: "2.10.4" | ||
base-tags: '["ckan/ckan-base:2.10-py3.10", "ckan/ckan-base:2.10.4-py3.10"]' | ||
dev-tags: '["ckan/ckan-dev:2.10-py3.10", "ckan/ckan-dev:2.10.4-py3.10"]' |
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,12 @@ | ||
name: Build and push CKAN 2.10 images (alpine) | ||
|
||
on: push | ||
|
||
jobs: | ||
call-reusable-workflow: | ||
uses: ./.github/workflows/reusable-docker-publish.yml | ||
with: | ||
ckan-major-version: "2.10" | ||
ckan-version: "2.10.4" | ||
base-tags: '["ckan/ckan-base:2.10", "ckan/ckan-base:2.10.4"]' | ||
dev-tags: '["ckan/ckan-dev:2.10", "ckan/ckan-dev:2.10.4"]' |
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,13 @@ | ||
name: Build and push CKAN 2.11 images | ||
|
||
on: push | ||
|
||
jobs: | ||
call-reusable-workflow: | ||
uses: ./.github/workflows/reusable-docker-publish.yml | ||
with: | ||
ckan-major-version: "2.11" | ||
ckan-version: "2.11" | ||
# TODO: minor version | ||
base-tags: '["ckan/ckan-base:2.11", "ckan/ckan-base:2.11-py3.10"]' | ||
dev-tags: '["ckan/ckan-dev:2.11", "ckan/ckan-dev:2.11-py3.10"]' |
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,12 @@ | ||
name: Build and push CKAN 2.9 images (python) | ||
|
||
on: push | ||
|
||
jobs: | ||
call-reusable-workflow: | ||
uses: ./.github/workflows/reusable-docker-publish.yml | ||
with: | ||
ckan-major-version: "2.9" | ||
ckan-version: "2.9.11" | ||
base-tags: '["ckan/ckan-base:2.9-py3.9", "ckan/ckan-base:2.9.11-py3.9"]' | ||
dev-tags: '["ckan/ckan-dev:2.9-py3.9", "ckan/ckan-dev:2.9.11-py3.9"]' |
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,12 @@ | ||
name: Build and push CKAN 2.9 images (alpine) | ||
|
||
on: push | ||
|
||
jobs: | ||
call-reusable-workflow: | ||
uses: ./.github/workflows/reusable-docker-publish.yml | ||
with: | ||
ckan-major-version: "2.9" | ||
ckan-version: "2.9.11" | ||
base-tags: '["ckan/ckan-base:2.9", "ckan/ckan-base:2.9.11"]' | ||
dev-tags: '["ckan/ckan-dev:2.9", "ckan/ckan-dev:2.9.11"]' |
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,53 @@ | ||
name: Reusable CKAN Docker images build and push | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
ckan-major-version: | ||
required: true | ||
type: string | ||
ckan-version: | ||
required: true | ||
type: string | ||
base-tags: | ||
required: true | ||
type: string | ||
dev-tags: | ||
required: true | ||
type: string | ||
docker-file: | ||
required: false | ||
default: 'Dockerfile' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build ${{ inputs.ckan-major-version }} base | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: ckan-${{ inputs.ckan-major-version }}/base | ||
file: ckan-${{ inputs.ckan-major-version }}/base/${{ inputs.docker-file }} | ||
push: true | ||
build-args: | | ||
CKAN_VERSION=${{ inputs.ckan-version }} | ||
tags: ${{ fromJson(inputs.base-tags) }} | ||
|
||
- name: Build ${{ inputs.ckan-major-version }} dev | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: ckan-${{ inputs.ckan-major-version }}/dev | ||
file: ckan-${{ inputs.ckan-major-version }}/dev/${{ inputs.docker-file }} | ||
push: true | ||
build-args: | | ||
CKAN_VERSION=${{ inputs.ckan-version }} | ||
tags: ${{ fromJson(inputs.dev-tags) }} |