Skip to content

fix(kube): preserve raw IDs for SDK resource reads (#1) #3

fix(kube): preserve raw IDs for SDK resource reads (#1)

fix(kube): preserve raw IDs for SDK resource reads (#1) #3

Workflow file for this run

name: Provider CI
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: provider-ovh-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
build:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
contents: read
packages: write
env:
GOMAXPROCS: '2'
GOFLAGS: '-p=2'
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: '1.25.13'
cache: true
- uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- uses: docker/setup-buildx-action@v3
with:
install: true
- name: Choose commit-specific package version
id: version
shell: bash
run: printf 'version=v2.19.1-wmotr.1.g%s\n' "${GITHUB_SHA:0:12}" >> "$GITHUB_OUTPUT"
- name: Cache build tools and dependencies
uses: actions/cache@v4
with:
path: |
.work
_output/tools
key: provider-ovh-tools-${{ runner.os }}-${{ hashFiles('go.sum', 'Makefile', 'build/**') }}
- name: Install pinned code-generation formatter
run: go install golang.org/x/tools/cmd/goimports@v0.49.0
- name: Vendor dependencies
run: make vendor vendor.check
- name: Generate, lint and test
run: make reviewable VERSION=v2.19.1
- name: Test SDK import regression
run: go test ./config/...
- name: Verify generated sources and CRDs are unchanged
run: git diff --exit-code
- name: Build both provider package architectures
env:
PACKAGE_VERSION: ${{ steps.version.outputs.version }}
BUILD_ARGS: '--load --label org.opencontainers.image.source=https://github.com/wmotr/provider-ovh'
run: make build.all VERSION="$PACKAGE_VERSION" PLATFORMS='linux_amd64 linux_arm64'
- name: Retain tested provider packages
uses: actions/upload-artifact@v4
with:
name: provider-ovh-xpkg
path: _output/xpkg/**/*.xpkg
if-no-files-found: error
retention-days: 7
- name: Authenticate package publication
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Publish tested packages to GHCR
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
env:
PACKAGE_VERSION: ${{ steps.version.outputs.version }}
run: |
make xpkg.release.publish VERSION="$PACKAGE_VERSION" \
PLATFORMS='linux_amd64 linux_arm64' XPKG_REG_ORGS=ghcr.io/wmotr
printf 'Published ghcr.io/wmotr/provider-ovh:%s\n' "$PACKAGE_VERSION" >> "$GITHUB_STEP_SUMMARY"