Skip to content

Commit

Permalink
Merge pull request #156 from ulucinar/parameterize-regorg
Browse files Browse the repository at this point in the history
Add "branch_name", "version" and "regorg" parameters to the "Provider Publish Service Artifacts" reusable workflow
  • Loading branch information
ulucinar authored Oct 12, 2023
2 parents cdec277 + 8f1bf4f commit 96026e7
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/provider-publish-service-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
default: 'monolith'
required: false
type: string
regorg:
description: 'Package registry and organization where the packages will be pushed or (e.g. xpkg.upbound.io/upbound)'
default: 'xpkg.upbound.io/upbound'
required: false
type: string
size:
description: "Number of packages to build and push with each matrix build job"
default: '30'
Expand All @@ -18,6 +23,16 @@ on:
default: '1'
required: false
type: string
branch_name:
description: "Branch name to use while publishing the packages"
default: ''
required: false
type: string
version:
description: "Version string to use while publishing the packages"
default: ''
required: false
type: string
secrets:
UPBOUND_MARKETPLACE_PUSH_ROBOT_USR:
required: true
Expand Down Expand Up @@ -123,7 +138,7 @@ jobs:
if [ $num_packages -gt 10 ]; then
num_packages=10
fi
make -j $num_packages SUBPACKAGES="${{ steps.packages.outputs.target }}" XPKG_REG_ORGS=xpkg.upbound.io/upbound XPKG_REG_ORGS_NO_PROMOTE=xpkg.upbound.io/upbound build.all
make -j $num_packages SUBPACKAGES="${{ steps.packages.outputs.target }}" XPKG_REG_ORGS="${{ inputs.regorg }}" XPKG_REG_ORGS_NO_PROMOTE="${{ inputs.regorg }}" ${{ inputs.branch_name != '' && format('BRANCH_NAME={0}', inputs.branch_name) || '' }} ${{ inputs.version != '' && format('VERSION={0}', inputs.version) || '' }} build.all
echo "num_packages=$num_packages" >> $GITHUB_OUTPUT
env:
# We're using docker buildx, which doesn't actually load the images it
Expand All @@ -132,4 +147,4 @@ jobs:

- name: Publish Artifacts
run: |
make -j ${{ steps.build_artifacts.outputs.num_packages }} SUBPACKAGES="${{ steps.packages.outputs.target }}" XPKG_REG_ORGS=xpkg.upbound.io/upbound XPKG_REG_ORGS_NO_PROMOTE=xpkg.upbound.io/upbound CONCURRENCY="${{ inputs.concurrency }}" publish
make -j ${{ steps.build_artifacts.outputs.num_packages }} SUBPACKAGES="${{ steps.packages.outputs.target }}" XPKG_REG_ORGS="${{ inputs.regorg }}" XPKG_REG_ORGS_NO_PROMOTE="${{ inputs.regorg }}" CONCURRENCY="${{ inputs.concurrency }}" ${{ inputs.branch_name != '' && format('BRANCH_NAME={0}', inputs.branch_name) || '' }} ${{ inputs.version != '' && format('VERSION={0}', inputs.version) || '' }} publish

0 comments on commit 96026e7

Please sign in to comment.