diff --git a/.github/workflows/validate-puppetcore-gem-sources.yml b/.github/workflows/validate-puppetcore-gem-sources.yml new file mode 100644 index 0000000000000000000000000000000000000000..88de461df3e351ee55c54ef01a132dd005cc6e9f --- /dev/null +++ b/.github/workflows/validate-puppetcore-gem-sources.yml @@ -0,0 +1,38 @@ +name: Validate Puppetcore Gem Sources + +on: + workflow_dispatch: + inputs: + ref: + description: 'Branch, tag or SHA to checkout' + required: true + default: 'main' + +jobs: + verify-gemfile: + runs-on: ubuntu-latest + name: Verify Gemfile Dependencies + + env: + PUPPET_AUTH_TOKEN: ${{ secrets.PUPPET_AUTH_TOKEN }} + BUNDLE_RUBYGEMS___PUPPETCORE__PUPPET__COM: "forge-key:${{ secrets.PUPPET_AUTH_TOKEN }}" + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.ref }} + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.2' + bundler-cache: true + cache-version: 0 # Helps manage cache versions explicitly + working-directory: . + + - name: Install dependencies + run: bundle install + + - name: Run Gemfile verification test + run: bundle exec rspec spec/support/gemfile_spec.rb --format documentation