Fixing variables as inputs

This commit is contained in:
XargonWan 2024-11-05 15:11:28 +09:00
parent fc23e10cbc
commit c11f3af975

View file

@ -12,12 +12,15 @@ on:
MANIFEST_FILENAME: MANIFEST_FILENAME:
required: true required: true
type: string type: string
DYNAMIC_MANIFEST:
required: false
type: string
default: "false"
env: env:
DATE: ${{ github.run_id }} DATE: ${{ github.run_id }}
jobs: jobs:
Building-project: Building-project:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -39,7 +42,7 @@ jobs:
submodules: 'true' submodules: 'true'
- name: "Assembling manifest" - name: "Assembling manifest"
if: ${{ env.DYNAMIC_MANIFEST == 'true' }} if: ${{ inputs.DYNAMIC_MANIFEST == 'true' }}
run: | run: |
if [ -f "${GITHUB_WORKSPACE}/automation_tools/assemble_manifest.sh" ]; then if [ -f "${GITHUB_WORKSPACE}/automation_tools/assemble_manifest.sh" ]; then
/bin/bash "${GITHUB_WORKSPACE}/automation_tools/assemble_manifest.sh" /bin/bash "${GITHUB_WORKSPACE}/automation_tools/assemble_manifest.sh"
@ -49,12 +52,12 @@ jobs:
fi fi
- name: "[DEBUG] Outputting manifest" - name: "[DEBUG] Outputting manifest"
if: ${{ env.DYNAMIC_MANIFEST == 'true' }} if: ${{ inputs.DYNAMIC_MANIFEST == 'true' }}
run: | run: |
if [ -f "${{ env.MANIFEST_FILENAME }}" ]; then if [ -f "${{ inputs.MANIFEST_FILENAME }}" ]; then
cat "${{ env.MANIFEST_FILENAME }}" cat "${{ inputs.MANIFEST_FILENAME }}"
else else
echo "ERROR: manifest file not found: ${{ env.MANIFEST_FILENAME }}" echo "ERROR: manifest file not found: ${{ inputs.MANIFEST_FILENAME }}"
exit 1 exit 1
fi fi
@ -76,7 +79,7 @@ jobs:
--install-deps-from=flathub-beta \ --install-deps-from=flathub-beta \
--repo="/workspace/artifacts-repo" \ --repo="/workspace/artifacts-repo" \
"/workspace/artifacts-build-dir" \ "/workspace/artifacts-build-dir" \
"${{ env.MANIFEST_FILENAME }}" "${{ inputs.MANIFEST_FILENAME }}"
- name: "Exporting dir tree" - name: "Exporting dir tree"
id: tree id: tree