Update CI and build #65
Workflow file for this run
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 | |
on: | |
pull_request: | |
branches: | |
# on pull requests to develop and release branches | |
- 'develop' | |
- 'v*' | |
paths-ignore: | |
- '*.md' | |
- 'changelogs/**' | |
- 'example/**' | |
- 'LICENSE' | |
- 'MAINTAINERS' | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Shellcheck | |
uses: reviewdog/action-shellcheck@v1 | |
with: | |
github_token: ${{ secrets.github_token }} | |
reporter: github-pr-review | |
path: '.' | |
pattern: '*.sh' | |
exclude: './vendor/*' | |
test: | |
runs-on: ubuntu-latest | |
needs: ['lint'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go 1.14 | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.14.7 | |
- name: Setup Minikube-Kubernetes | |
uses: medyagh/setup-minikube@latest | |
with: | |
cache: false | |
minikube-version: 1.33.1 | |
driver: none | |
kubernetes-version: v1.27.16 | |
cni: calico | |
start-args: '--install-addons=false' | |
- name: Build images locally | |
run: make build && make container || exit 1; | |
- name: Setting environment variables | |
run: | | |
kubectl cluster-info | |
echo "KUBECONFIG=$HOME/.kube/config" >> $GITHUB_ENV | |
echo "VELERO_RELEASE=v1.6.0" >> $GITHUB_ENV | |
echo "OPENEBS_RELEASE=master" >> $GITHUB_ENV | |
- name: Installation | |
run: | | |
./script/install-openebs.sh | |
./script/install-velero.sh | |
- name: Running tests | |
run: make test | |
plugin: | |
runs-on: ubuntu-latest | |
needs: ['test'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: all | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
version: v0.5.1 | |
- name: Build Image | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: ./plugin.Dockerfile | |
push: false | |
platforms: linux/amd64, linux/arm64 | |
tags: | | |
openebs/velero-plugin:ci |