Skip to content

obs

obs #266

Workflow file for this run

name: obs
on:
pull_request:
workflow_dispatch:
inputs:
revision:
default: main
description: Branch or Tag to be published
type: string
skip-bundles:
default: false
description: Skip bundling and only stage+test+release
type: boolean
skip-stage:
default: false
description: Skip staging and only bundles+test+release
type: boolean
skip-tests:
default: false
description: Skip testing and only bundles+stage+release
type: boolean
skip-release:
default: false
description: Skip releasing and only bundles+stage+test
type: boolean
env:
REVISION: ${{ inputs.revision || 'main' }}
OBS_PASSWORD: ${{ secrets.OBS_PASSWORD }}
jobs:
bundles:
runs-on: ubuntu-latest
strategy:
matrix:
arch:
- amd64
- arm64
- ppc64le
name: bundle / build / ${{ inputs.revision || 'main' }} / ${{ matrix.arch }}
steps:
- uses: actions/checkout@v4
- uses: sigstore/cosign-installer@v3
- run: scripts/bundle/build
if: ${{ inputs.skip-bundles == false }}
env:
ARCH: ${{ matrix.arch }}
- uses: actions/upload-artifact@v3
if: ${{ inputs.skip-bundles == false }}
with:
name: bundles
path: build/bundle/*.tar.gz*
bundle-test:
name: bundle / test / ${{ inputs.revision || 'main' }} / amd64
runs-on: ubuntu-latest
needs: bundles
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
if: ${{ inputs.skip-bundles == false }}
with:
name: bundles
path: build/bundle
- run: sudo -E scripts/bundle/test
if: ${{ inputs.skip-bundles == false }}
bundles-publish:
name: bundles / publish / ${{ inputs.revision || 'main' }}
runs-on: ubuntu-latest
needs: bundle-test
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: google-github-actions/auth@v1
if: ${{ inputs.skip-bundles == false && github.event_name != 'pull_request' }}
with:
credentials_json: ${{ secrets.GCS_CRIO_SA }}
- uses: sigstore/cosign-installer@v3
if: ${{ inputs.skip-bundles == false && github.event_name != 'pull_request' }}
- uses: actions/download-artifact@v3
if: ${{ inputs.skip-bundles == false && github.event_name != 'pull_request' }}
with:
name: bundles
path: build/bundle
- run: scripts/sign-artifacts
if: ${{ inputs.skip-bundles == false && github.event_name != 'pull_request' }}
- uses: google-github-actions/upload-cloud-storage@v1
if: ${{ inputs.skip-bundles == false && github.event_name != 'pull_request' }}
with:
path: build/bundle
destination: cri-o/artifacts
parent: false
- uses: actions/upload-artifact@v3
if: ${{ inputs.skip-bundles == false && github.event_name != 'pull_request' }}
with:
name: signatures
path: |
build/bundle/*.sig
build/bundle/*.cert
stage:
runs-on: ubuntu-latest
name: stage / ${{ inputs.revision || 'main' }}
timeout-minutes: 240
needs: bundles-publish
steps:
- uses: actions/checkout@v4
- run: scripts/obs
if: ${{ inputs.skip-stage == false && github.event_name != 'pull_request' }}
test-kubernetes:
runs-on: macos-12
timeout-minutes: 120
needs: stage
strategy:
matrix:
type:
- deb
- rpm
name: test / kubernetes / ${{ matrix.type }} / amd64
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: |
~/.vagrant.d/boxes
key: test-${{ hashFiles('test/deb/Vagrantfile') }}-${{ hashFiles('test/rpm/Vagrantfile') }}
- run: scripts/test-kubernetes
if: ${{ inputs.skip-tests == false }}
env:
TYPE: ${{ matrix.type }}
test-architectures:
runs-on: ubuntu-latest
timeout-minutes: 120
needs: stage
strategy:
matrix:
image:
- almalinux:9.2
- debian:12
- fedora:38
- ubuntu:22.04
arch:
- amd64
- arm64
- ppc64le
type:
- deb
- rpm
exclude:
- image: almalinux:9.2
type: deb
- image: debian:12
type: rpm
- image: fedora:38
type: deb
- image: fedora:38
arch: arm64 # takes forever
- image: ubuntu:22.04
type: rpm
name: test / ${{ matrix.type }} / ${{ matrix.image }} / ${{ matrix.arch }}
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- run: scripts/test-architectures
if: ${{ inputs.skip-tests == false }}
env:
IMAGE: ${{ matrix.image }}
ARCH: ${{ matrix.arch }}
TYPE: ${{ matrix.type }}
release:
runs-on: ubuntu-latest
name: release / ${{ inputs.revision || 'main' }}
needs:
- test-kubernetes
- test-architectures
steps:
- uses: actions/checkout@v4
- run: scripts/obs
if: ${{ inputs.skip-release == false && github.event_name != 'pull_request' }}
env:
RUN_RELEASE: 1