CI #1
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: CI | |
env: | |
IMAGE_NAME: activemq-artemis-operator | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.20.13' | |
cache: true | |
- name: Checkout the repo | |
uses: actions/checkout@v4 | |
- name: Start minikube | |
id: minikube | |
uses: medyagh/setup-minikube@master | |
with: | |
cpus: 2 | |
memory: 4g | |
- name: Check go.mod and go.sum files | |
run: go mod tidy && git status && git diff-index --quiet HEAD -- | |
- name: Check generate files | |
run: make generate-deploy && make bundle && git status && git diff-index --quiet HEAD -- | |
- name: Build the image | |
run: | | |
podman build --build-arg TARGETOS=linux --build-arg TARGETARCH=amd64 --label quay.expires-after=90d --label git-sha=$GITHUB_SHA --no-cache --platform linux/amd64 --manifest $IMAGE_NAME:dev.latest . | |
- name: Push the image into minikube | |
run: | | |
export SHELL=/bin/bash | |
eval $(minikube -p minikube docker-env) | |
docker image list | |
export OPERATOR_IMAGE=$(grep -Po '(?<=image: ).*' ./deploy/operator.yaml) | |
podman tag $IMAGE_NAME:dev.latest $OPERATOR_IMAGE | |
podman save --output activemq-artemis-operator-image.tar --format docker-archive $OPERATOR_IMAGE | |
docker image load --input activemq-artemis-operator-image.tar | |
docker image list | |
- name: Execute the tests | |
run: make test-mk-v | |
- name: Execute the tests | |
run: make test-mk-do-v |