From dccd882406ae2fc34cc9f1a1fb212cab26fd0b9a Mon Sep 17 00:00:00 2001 From: SuperQ Date: Thu, 9 Mar 2023 14:55:45 +0100 Subject: [PATCH] Add additional input params * `promu_config` to allow changing which promu config file to use. * `docker_image_tag` to allow customizeation of the output image tag. Signed-off-by: SuperQ --- actions/build/action.yml | 6 +++++- actions/publish_images/action.yml | 6 ++++++ actions/publish_release/action.yml | 10 +++++++--- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/actions/build/action.yml b/actions/build/action.yml index 14019f4..b264255 100644 --- a/actions/build/action.yml +++ b/actions/build/action.yml @@ -9,6 +9,10 @@ inputs: type: integer description: Number of builds to do in parallel default: 3 + promu_config: + type: string + description: Config file for promu + default: .promu.yml promu_opts: type: string description: Options to pass to promu @@ -16,7 +20,7 @@ runs: using: composite steps: - uses: ./.github/promci/actions/setup_environment - - run: ~/go/bin/promu crossbuild -v --parallelism ${{ inputs.parallelism }} --parallelism-thread ${{ inputs.thread }} ${{ inputs.promu_opts }} + - run: ~/go/bin/promu -c ${{ inputs.promu_config }} crossbuild -v --parallelism ${{ inputs.parallelism }} --parallelism-thread ${{ inputs.thread }} ${{ inputs.promu_opts }} shell: bash - uses: ./.github/promci/actions/save_artifacts with: diff --git a/actions/publish_images/action.yml b/actions/publish_images/action.yml index bc17eb7..37336cc 100644 --- a/actions/publish_images/action.yml +++ b/actions/publish_images/action.yml @@ -24,6 +24,9 @@ inputs: description: Name of the container image type: string default: "" + docker_image_tag: + description: A custom image tag to be added + type: string runs: using: composite steps: @@ -36,6 +39,9 @@ runs: - if: inputs.dockerbuild_context != '' run: echo "export DOCKERBUILD_CONTEXT=${{ inputs.dockerbuild_context }}" >> /tmp/tmp-profile shell: bash + - if: inputs.docker_image_tag != '' + run: echo "export DOCKER_IMAGE_TAG=${{ inputs.docker_image_tag }}" >> /tmp/tmp-profile + shell: bash - run: | touch /tmp/tmp-profile . /tmp/tmp-profile diff --git a/actions/publish_release/action.yml b/actions/publish_release/action.yml index cb15394..e32bc8b 100644 --- a/actions/publish_release/action.yml +++ b/actions/publish_release/action.yml @@ -23,6 +23,10 @@ inputs: github_token: type: string description: Github Token + promu_config: + type: string + description: Config file for promu + default: .promu.yml runs: using: composite steps: @@ -30,11 +34,11 @@ runs: with: enable_docker_multibuild: true - uses: ./.github/promci/actions/restore_artifacts - - run: ~/go/bin/promu crossbuild tarballs + - run: ~/go/bin/promu -c ${{ inputs.promu_config}} crossbuild tarballs shell: bash - - run: ~/go/bin/promu checksum .tarballs + - run: ~/go/bin/promu -c ${{ inputs.promu_config}} checksum .tarballs shell: bash - - run: ~/go/bin/promu release .tarballs + - run: ~/go/bin/promu -c ${{ inputs.promu_config}} release .tarballs shell: bash env: GITHUB_TOKEN: ${{ inputs.github_token }}