Skip to content

obs

obs #129

Workflow file for this run

name: obs
on:
workflow_dispatch:
inputs:
revision:
default: main
description: Branch or Tag to be published
type: string
skip-stage:
default: false
description: Skip staging and only test+release
type: boolean
skip-tests:
default: false
description: Skip testing and only stage+release
type: boolean
skip-release:
default: false
description: Skip releasing and only stage+test
type: boolean
env:
REVISION: ${{ inputs.revision || 'main' }}
OBS_PASSWORD: ${{ secrets.OBS_PASSWORD }}
jobs:
stage:
runs-on: ubuntu-latest
name: stage / ${{ inputs.revision }}
timeout-minutes: 240
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: test-${{ hashFiles('scripts/obs') }}-${{ hashFiles('scripts/vars') }}
- run: scripts/obs
if: ${{ inputs.skip-stage == false }}
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
~/.cache/go-build
~/go/pkg/mod
key: test-${{ hashFiles('test/deb/Vagrantfile') }}-${{ hashFiles('test/rpm/Vagrantfile') }}
- run: brew install gnu-sed
- 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 }}
needs:
- test-kubernetes
- test-architectures
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: test-${{ hashFiles('scripts/obs') }}-${{ hashFiles('scripts/vars') }}
- run: scripts/obs
if: ${{ inputs.skip-release == false }}
env:
RUN_RELEASE: 1