Skip to content

Commit

Permalink
Test github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Dec 3, 2024
1 parent 2ade49e commit 82ac1a0
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/build-ckan-2.10-focal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Build CKAN 2.10 on Ubuntu 20.04 (focal)

on: push

jobs:
call-reusable-workflow:
uses: ./.github/workflows/reusable-build-deb-package.yml
with:
ckan-ref: "dev-v2.10"
ubuntu-version: "20.04"
44 changes: 44 additions & 0 deletions .github/workflows/reusable-build-deb-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Reusable CKAN deb packages build workflow

on:
workflow_call:
inputs:
ckan-ref:
required: true
type: string
ubuntu-version:
required: true
type: string

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: Build package
uses: docker/build-push-action@v6
with:
push: false
outputs: "type=local,dest=/tmp"
build-args: |
CKAN_REF=${{ inputs.ckan-ref }}
UBUNTU_VERSION=${{ inputs.ubuntu-version }}
- name: Rename file
# To remove patch version .e.g python-ckan_2.11.1b0-jammy1_amd64.deb -> python-ckan_2.11-jammy1_amd64.deb
run: |
for f in /tmp/python-ckan_*; do mv "$f" "$(echo "$f" | sed 's/\([0-9]\+\.[0-9]\+\)[^-]*-/\1-/')"; done
OUTPUT_FILE=$(basename /tmp/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: /tmp/${{ env.OUTPUT_FILE }}

0 comments on commit 82ac1a0

Please sign in to comment.