obs #72
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | |
- debian:12 | |
- fedora:38 | |
- ubuntu:22.04 | |
arch: | |
- amd64 | |
- arm64 | |
- ppc64le | |
type: | |
- deb | |
- rpm | |
exclude: | |
- image: debian:12 | |
type: rpm | |
- image: fedora:38 | |
type: deb | |
- 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 |