From 186c2d8975b4aca2f1176a8b8b247047e37383f5 Mon Sep 17 00:00:00 2001 From: Amine Chikhaoui Date: Wed, 28 Jan 2026 10:38:20 -0500 Subject: [PATCH] Add apk-cache-dir and env-file flags to melange build Signed-off-by: Amine Chikhaoui --- melange-build-pkg/action.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/melange-build-pkg/action.yaml b/melange-build-pkg/action.yaml index 032a9231..d44f7604 100644 --- a/melange-build-pkg/action.yaml +++ b/melange-build-pkg/action.yaml @@ -85,6 +85,11 @@ inputs: Directory used for cached inputs default: '' + apk-cache-dir: + description: | + Directory used for cached apk packages + default: '' + pipeline-dir: description: | Directory used for pipelines @@ -100,6 +105,11 @@ inputs: URL of the git repository containing the build config file default: '' + env-file: + description: | + File to use for preloaded environment variables + default: '' + runs: using: 'composite' @@ -117,9 +127,11 @@ runs: [ -n '${{ inputs.workspace-dir }}' ] && workspacearg="--workspace-dir ${{ inputs.workspace-dir }}" [ -n '${{ inputs.namespace }}' ] && nsarg="--namespace ${{ inputs.namespace }}" [ -n '${{ inputs.cache-dir }}' ] && cachearg="--cache-dir=${{ inputs.cache-dir }}" + [ -n '${{ inputs.apk-cache-dir }}' ] && apkcachearg="--apk-cache-dir=${{ inputs.apk-cache-dir }}" [ -n '${{ inputs.pipeline-dir }}' ] && pipelinedirarg="--pipeline-dir=${{ inputs.pipeline-dir }}" [ -n '${{ inputs.git-commit }}' ] && gitcommitarg="--git-commit ${{ inputs.git-commit }}" [ -n '${{ inputs.git-repo-url }}' ] && gitrepoarg="--git-repo-url ${{ inputs.git-repo-url }}" + [ -n '${{ inputs.env-file }}' ] && envfilearg="--env-file ${{ inputs.env-file }}" ${{ inputs.empty-workspace }} && workspacearg="$workspacearg --empty-workspace" ${{ inputs.empty-workspace }} || workspacearg="$workspacearg --source-dir ${{ inputs.source-dir }}/${{ inputs.workdir }}" ${{ inputs.sign-with-key }} && signarg="--signing-key ${{ inputs.signing-key-path }}" @@ -133,7 +145,7 @@ runs: repoarg="${repoarg} --repository-append ${{ inputs.repository-path }}" keyringarg="${keyringarg} --keyring-append ${{ inputs.signing-key-path }}.pub" fi - sudo melange build $config --arch ${{ inputs.archs }} --out-dir ${{ inputs.repository-path }} $signarg $repoarg $keyringarg $workspacearg $indexarg $nsarg $cachearg $pipelinedirarg $gitcommitarg $gitrepoarg + sudo melange build $config --arch ${{ inputs.archs }} --out-dir ${{ inputs.repository-path }} $signarg $repoarg $keyringarg $workspacearg $indexarg $nsarg $cachearg $apkcachearg $pipelinedirarg $gitcommitarg $gitrepoarg $envfile done - name: 'Fix local repository permissions' shell: bash