Skip to content

Commit

Permalink
Adds a job that produces artifacts from each of the last n katello co…
Browse files Browse the repository at this point in the history
…nfigs
  • Loading branch information
James Jeffers committed Apr 8, 2021
1 parent 534b8ec commit afe5434
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/secondary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: artifacts

on: [push, pull_request]

jobs:
prepare:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v2
- id: set-matrix
run: echo "::set-output name=matrix::$(ls configs/katello/ | sed '/-/!{s/$/_/}' | sort -rV | sed 's/_$//' | grep yaml | grep -v nightly | head -n 3 | jq -cRs 'split("\n")[:-1]')"
build:
needs: prepare
runs-on: ubuntu-latest
strategy:
matrix:
version: ${{fromJson(needs.prepare.outputs.matrix)}}
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.5'
bundler-cache: true
- name: setup environment
run: bundle exec ./tools.rb setup-environment configs/katello/${{ matrix.version }}
- name: generate CHANGELOG
run: bundle exec ./tools.rb changelog configs/katello/${{ matrix.version }}
- name: generate cherry-picks
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
run: bundle exec ./tools.rb cherry-picks configs/katello/${{ matrix.version }}
- uses: actions/upload-artifact@v2
with:
name: katello-${{ matrix.version }}
path: |
cherry_picks*
repos/katello/**/katello/CHANGELOG.md

0 comments on commit afe5434

Please sign in to comment.