Skip to content

Commit 28547cd

Browse files
committed
Add option for how to install CKAN
allows for skipping installation entirely, as well as supporting non-debian-based operating systems in the future.
1 parent abe7037 commit 28547cd

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

.github/actions/setup-ckan/action.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ x-env:
66
description: The path to use as the root of a KSP instance for CKAN to set-up. If not set, `/tmp/ksp` is used instead.
77

88
inputs:
9+
ckan-install-method:
10+
description: Method of installing CKAN. Can be set to 'apt' to install from the official .deb file, or 'skip' to skip installation if your runner already has CKAN installed.
11+
default: 'apt'
12+
913
ckan-version:
1014
description: CKAN tag to install. set to an empty string to always install the most recent version. See [the CKAN releases page](https://github.com/KSP-CKAN/CKAN/tags) for a list of available tags
1115
default: ''
@@ -42,7 +46,8 @@ runs:
4246
shell: bash
4347
run: echo 'KSP_ROOT=${{ '/tmp/ksp' }}' >> "$GITHUB_ENV"
4448

45-
- name: Install CKAN
49+
- name: Install CKAN via apt
50+
if: ${{ inputs.ckan-install-method == 'apt' }}
4651
shell: bash
4752
run: |
4853
sudo rm -f /var/lib/man-db/auto-update # skip updating man pages, which takes a long time and makes no sense in a CI job
@@ -53,14 +58,14 @@ runs:
5358
env:
5459
GH_TOKEN: ${{ github.token }}
5560

56-
- name: Setup CKAN Instance
61+
- name: Setup fake KSP instance
5762
shell: bash
5863
run: |
5964
${{ runner.debug && 'echo "$PATH"' }}
6065
ckan instance fake --set-default KSP ${{ env.KSP_ROOT }} 1.12.5 --game KSP --MakingHistory 1.9.1 --BreakingGround 1.7.1 ${{ runner.debug && '--verbose' }}
6166
ckan update
6267
63-
- name: Setup CKAN Compatible Versions
68+
- name: Setup CKAN compatible versions
6469
shell: bash
6570
if: inputs.ckan-compatible-versions != ''
6671
run: |
@@ -70,7 +75,7 @@ runs:
7075
env:
7176
VERSIONS: ${{ inputs.ckan-compatible-versions }}
7277

73-
- name: Setup CKAN Filter
78+
- name: Setup CKAN filter
7479
shell: bash
7580
if: inputs.ckan-filters != ''
7681
run: |

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ All notable changes to this project will be documented in this file
2929
- `compile` action: Use `dotnet restore` instead of `nuget restore` by default, allowing the action to work on any Ubuntu runner image. Added the `use-nuget-restore` option to restore the previous behavior for projects that use packages.config for dependencies. (#68)
3030
- `compile` action: Removed call to`actions/setup-dotnet`. Setting up .NET should be done as a separate step. (#65)
3131
- `setup-ckan` action: Sped up execution by skipping recommended packages and man-db updates
32+
- `setup-ckan` action: Add `ckan-install-method` option for installation method. Currently supports `'apt'` for installation on Debian/Ubuntu, or `'skip'` to skip installation for runners that already have CKAN installed.
3233
- `assemble-release` action: `outputs.artifact-path` now includes the `.zip` extension (#51)
3334

3435

0 commit comments

Comments
 (0)