publish-to-spacedock #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
name: publish-to-spacedock | |
on: | |
workflow_dispatch: | |
inputs: | |
spacedock-username: | |
type: string | |
spacedock-password: | |
type: string | |
game-id: | |
type: number | |
default: 3102 # hardcoded to KSP1 gameid. retrieve from https://spacedock.info/api/games | |
mod-id: | |
type: number | |
env: | |
SPACEDOCK_USERNAME: ${{ inputs.spacedock-username || github.triggering_actor }} | |
SPACEDOCK_MOD_ID: ${{ inputs.mod-id || vars.SPACEDOCK_MOD_ID }} | |
jobs: | |
publish-to-spacedock: | |
runs-on: ubuntu-latest | |
steps: | |
- name: setup-inputs | |
run: | | |
printenv | |
# see https://dev.to/leading-edje/masking-input-parameters-in-github-actions-1ci | |
SPACEDOCK_PASSWORD=$(jq -r ".inputs.spacedock-password" $GITHUB_EVENT_PATH) | |
echo ::add-mask::$SPACEDOCK_PASSWORD | |
echo SPACEDOCK_PASSWORD=$SPACEDOCK_PASSWORD >> $GITHUB_ENV |