Skip to content

Support Debian 12 packages (#252) #43

Support Debian 12 packages (#252)

Support Debian 12 packages (#252) #43

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
jobs:
release-buildbox:
strategy:
fail-fast: false
matrix:
dist:
- el7
- el8
- el9
- amzn2023
- ubuntu-20.04
- ubuntu-22.04
- debian-12
arch:
- x86_64
- aarch64
- ppc64le
exclude:
- dist: amzn2023
arch: ppc64le
- dist: ubuntu-20.04
arch: ppc64le
- dist: ubuntu-22.04
arch: ppc64le
name: Release buildbox
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Setup Ruby using Bundler
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0.4'
bundler: '2.1.4'
bundler-cache: true
- name: setup the environment
run: echo "OOD_PACKAGING_BUILD_BOX_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
- name: docker build and tag
run: bundle exec rake ood_packaging:buildbox:build[${{ matrix.dist }},${{ matrix.arch }}]
- name: login to dockerhub
run: docker login -u ${{ secrets.OSC_ROBOT_DOCKERHUB_USER }} -p ${{ secrets.OSC_ROBOT_DOCKERHUB_TOKEN }}
- name: push images to dockerhub
run: bundle exec rake ood_packaging:buildbox:push[${{ matrix.dist }},${{ matrix.arch }}]
release-gem:
needs: [release-buildbox]
name: Release gem
runs-on: ubuntu-latest
steps:
- name: Set version
run: |
VERSION=${GITHUB_REF#refs/*/v}
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: checkout
uses: actions/checkout@v3
- name: Setup Ruby using Bundler
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0.4'
bundler: '2.1.4'
bundler-cache: true
- name: Setup Rubygems credentials
run: |
set +x
mkdir -p ~/.gem
cat << EOF > ~/.gem/credentials
---
:rubygems_api_key: ${{ secrets.OSC_ROBOT_RUBYGEMS_TOKEN }}
EOF
chmod 0600 ~/.gem/credentials
- name: Publish gem
run: |
bundle exec rake build
gem push pkg/ood_packaging-${{ env.VERSION }}.gem