-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use dynamic matrix to build all versions
- Loading branch information
Showing
10 changed files
with
90 additions
and
126 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,62 @@ | ||
name: CKAN deb packages build workflow | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- 'README.md' | ||
|
||
jobs: | ||
get-build-versions: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
versions: ${{ steps.get-versions.outputs.versions }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Get versions to build from VERSIONS file | ||
id: get-versions | ||
run: | | ||
# Remove whitespace and line breaks | ||
VERSIONS=$(cat "VERSIONS.json" | tr -d '[:space:]\n') | ||
echo "versions=$VERSIONS" >> $GITHUB_OUTPUT | ||
build: | ||
needs: get-build-versions | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
build: ${{ fromJson(needs.get-build-versions.outputs.versions) }} | ||
|
||
name: CKAN ref ${{ matrix.build.ckan_ref }} on Ubuntu ${{ matrix.build.ubuntu_version }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Build package | ||
uses: docker/build-push-action@v6 | ||
with: | ||
push: false | ||
outputs: "type=local,dest=." | ||
build-args: | | ||
CKAN_REF=${{ matrix.build.ckan_ref }} | ||
UBUNTU_VERSION=${{ matrix.build.ubuntu_version }} | ||
- name: Rename file | ||
# To remove patch version .e.g python-ckan_2.11.1b0-jammy_amd64.deb -> python-ckan_2.11-jammy_amd64.deb | ||
run: | | ||
for f in python-ckan_*; do mv "$f" "$(echo "$f" | sed 's/\([0-9]\+\.[0-9]\+\)[^-]*-/\1-/')"; done | ||
OUTPUT_FILE=$(basename python-ckan*) | ||
echo "OUTPUT_FILE=$OUTPUT_FILE" >> $GITHUB_ENV | ||
echo "Generated file: $OUTPUT_FILE" | ||
- name: Upload deb file | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.OUTPUT_FILE }} | ||
path: ${{ env.OUTPUT_FILE }} |
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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,18 @@ | ||
[ | ||
{ | ||
"ubuntu_version": "20.04", | ||
"ckan_ref": "ckan-2.10.5" | ||
}, | ||
{ | ||
"ubuntu_version": "22.04", | ||
"ckan_ref": "ckan-2.10.5" | ||
}, | ||
{ | ||
"ubuntu_version": "22.04", | ||
"ckan_ref": "ckan-2.11.0" | ||
}, | ||
{ | ||
"ubuntu_version": "24.04", | ||
"ckan_ref": "ckan-2.11.0" | ||
} | ||
] |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.