From c189121f1cf29ec21ebf4d0b30b2b39d23eb87fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Cassel?= Date: Wed, 19 Feb 2025 08:31:32 +0100 Subject: [PATCH] Use CI theforeman/action for smart proxy plugins - Respect SMART_PROXY_BRANCH in Gemfile --- .github/workflows/ci.yml | 36 ++++++++++++------------------------ Gemfile | 2 +- 2 files changed, 13 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ad38651..74589b0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,30 +1,18 @@ name: CI on: - - pull_request - - push + pull_request: + push: + branches: + - master + +concurrency: + group: ${{ github.ref_name }}-${{ github.workflow }} + cancel-in-progress: true jobs: test: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - ruby: - - "2.5" - - "2.6" - - "2.7" - name: Ruby ${{ matrix.ruby }} - steps: - - uses: actions/checkout@v3 - - name: Install development headers - run: sudo apt install libkrb5-dev libldap-dev libsasl2-dev -y - - name: Install Ruby ${{ matrix.ruby }} - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby }} - bundler-cache: true - - name: Run tests - run: bundle exec rake test - - name: Verify gem builds - run: gem build *.gemspec + name: Tests + uses: theforeman/actions/.github/workflows/smart_proxy_plugin.yml@v0 + with: + extra_packages: "libkrb5-dev libldap-dev libsasl2-dev" diff --git a/Gemfile b/Gemfile index 5644278..6c6fe94 100644 --- a/Gemfile +++ b/Gemfile @@ -5,5 +5,5 @@ gemspec group :development do gem 'rack-test' - gem 'smart_proxy', :git => 'https://github.com/theforeman/smart-proxy.git', :branch => 'develop' + gem 'smart_proxy', github: 'theforeman/smart-proxy', branch: ENV.fetch('SMART_PROXY_BRANCH', 'develop') end