Skip to content

Migrate CI from drone to GHA #98

Migrate CI from drone to GHA

Migrate CI from drone to GHA #98

Workflow file for this run

# Add a comment to force a change.
name: Webhook CI
on:
workflow_call:
push:
branches:
- release/v*
paths-ignore:
- '*.md'
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
pull_request:
paths-ignore:
- '*.md'
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
permissions:
contents: read
jobs:
build:
name: CI
runs-on : ubuntu-latest
strategy:
matrix:
arch:
- amd64
- arm64
steps:
- name : Checkout repository
uses : actions/checkout@v4
- run : make ci
name: ci
- name : install K3d
run : ./.github/workflows/scripts/install-k3d.sh
- name : setup cluster
run : ./.github/workflows/scripts/setup-cluster.sh
env:
CLUSTER_NAME: webhook
K3S_VERSION: v1.28.9-k3s1
ARCH: "${{ matrix.arch }}"
# Build the image this way because using the docker/build-push-action
# results in an image without an entrypoint
- name : import image
run : |
chmod +x bin/*
docker build --tag "rancher/webhook:${{ github.sha }}" -f package/Dockerfile .
k3d image import "rancher/webhook:${{ github.sha }}" -c webhook
- name : start rancher
run : ./.github/workflows/scripts/start-rancher.sh
env:
VERSION: "2.9"
RANCHER_IMAGE_TAG: "v2.9-head"
TMP: "${{ runner.temp }}"
ARCH: "${{ matrix.arch }}"
- name : Run integration tests
run : ./.github/workflows/scripts/integration-test-ci
env:
CLUSTER_NAME: webhook
IMAGE_REPO: rancher/webhook
IMAGE_TAG: "${{ github.sha }}"
ARCH: "${{ matrix.arch }}"