plugin-barman-cloud/.github/workflows/ci.yml
Marco Nenciarini f386c2d85a
ci: make runner labels configurable via CI_RUNNERS variable (#1023)
Switch all workflow jobs from a hardcoded ubuntu-latest to ${{
vars.CI_RUNNERS || 'ubuntu-latest' }}, so runner sizing can be changed
via the CI_RUNNERS organization/repository variable without editing
workflow files.

The cloudnative-pg organization CI_RUNNERS variable is already set to
ubuntu-latest-16-cores.

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
2026-07-20 18:17:21 +02:00

72 lines
2.2 KiB
YAML

name: CI
on:
pull_request:
workflow_dispatch:
permissions: read-all
jobs:
ci:
runs-on: ${{ vars.CI_RUNNERS || 'ubuntu-latest' }}
permissions:
packages: write
contents: write
steps:
- name: Cleanup Disk
if: vars.CI_RUNNERS == '' || vars.CI_RUNNERS == 'ubuntu-latest'
uses: jlumbroso/free-disk-space@v1.3.1
with:
android: true
dotnet: true
haskell: true
tool-cache: true
large-packages: false
swap-storage: false
- name: Cleanup docker cache
if: vars.CI_RUNNERS == '' || vars.CI_RUNNERS == 'ubuntu-latest'
run: |
echo "-------------Disk info before cleanup----------------"
df -h
echo "-----------------------------------------------------"
docker system prune -a -f
echo "-------------Disk info after cleanup----------------"
df -h
echo "-----------------------------------------------------"
- name: Checkout
uses: actions/checkout@v7.0.0
# We need the full history for the commitlint task
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Install QEMU static binaries
uses: docker/setup-qemu-action@v4
- name: Install Task
uses: arduino/setup-task@v3.0.0
- name: Install Dagger
env:
# renovate: datasource=github-tags depName=dagger/dagger versioning=semver
DAGGER_VERSION: 0.21.7
run: |
curl -L https://dl.dagger.io/dagger/install.sh | BIN_DIR=$HOME/.local/bin sh
- name: Run CI task
run: |
task ci
- name: Write manifest
run: |
task manifest
- name: Publish images
if: |
github.event_name == 'workflow_dispatch' ||
github.event.pull_request.head.repo.full_name == github.repository
env:
REGISTRY_USER: ${{ github.actor }}
REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
run: |
task publish
- name: Attach manifest to workflow run
uses: actions/upload-artifact@v7
with:
name: manifest.yaml
path: ./manifest.yaml