diff --git a/.github/workflows/module_release_prep.yml b/.github/workflows/module_release_prep.yml index a467b87..c80e192 100644 --- a/.github/workflows/module_release_prep.yml +++ b/.github/workflows/module_release_prep.yml @@ -11,6 +11,11 @@ on: description: "Module version to be released." required: true type: "string" + ruby_version: + description: "Ruby version to use" + required: false + default: "3.2" + type: "string" jobs: @@ -42,12 +47,20 @@ jobs: # Update version in metadata.json, only matching first occurrence sed -i "0,/$current_version/s//${{ github.event.inputs.version }}/" $(find . -name 'metadata.json') + - name: "Configure forge authentication" + env: + FORGE_TOKEN: ${{ secrets.PUPPET_FORGE_TOKEN || secrets.PUPPET_FORGE_TOKEN_PUBLIC }} + run: | + if [ -n "$FORGE_TOKEN" ]; then + echo "PUPPET_FORGE_TOKEN=$FORGE_TOKEN" >> $GITHUB_ENV + echo "BUNDLE_RUBYGEMS___PUPPETCORE__PUPPET__COM=forge-key:$FORGE_TOKEN" >> $GITHUB_ENV + fi + - name: "setup ruby" uses: "ruby/setup-ruby@v1" with: - ruby-version: "3.2" - bundler-cache: "true" - bundler: 2.4.22 + ruby-version: ${{ inputs.ruby_version }} + bundler-cache: true - name: "bundle environment" run: |