Add generic input for extra variables #1
Workflow file for this run
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
on: | ||
workflow_call: | ||
inputs: | ||
RELEASE_VERSION: | ||
description: "The version to build the package" | ||
required: true | ||
type: string | ||
extra_vars: | ||
description: "Extra variables to be exported, e.g.: BUILDTYPE=PRODUCTION UMLM_ENCRYPTION_KEY="${{ secrets.UMLM_ENCRYPTION_KEY }}" | ||
required: false | ||
type: string | ||
jobs: | ||
Build: | ||
name: 'Build Package' | ||
runs-on: ubuntu-latest | ||
env: | ||
RELEASE_VERSION: ${{ inputs.RELEASE_VERSION }} | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.ULTIMAKER_CI_PAT }} | ||
submodules: recursive | ||
- name: Build Package | ||
id: build | ||
run: | | ||
export ${{ inputs.extra_vars }} | ||
echo "RELEASE_VERSION: ${RELEASE_VERSION}" | ||
./build_for_ultimaker.sh -a build | ||
- name: Upload Artifact (Built package) | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: build-package | ||
path: "./*.deb" | ||
- name: Dump GitHub context | ||
if: ${{ always() }} | ||
env: | ||
GITHUB_CONTEXT: ${{ toJson(github) }} | ||
JOB_CONTEXT: ${{ toJson(job) }} | ||
STEPS_CONTEXT: ${{ toJson(steps) }} | ||
RUNNER_CONTEXT: ${{ toJson(runner) }} | ||
run: | | ||
echo "${GITHUB_CONTEXT}" | ||
echo "${JOB_CONTEXT}" | ||
echo "${STEPS_CONTEXT}" | ||
echo "${RUNNER_CONTEXT}" |