Skip to content

Pin dependencies

Pin dependencies #99

Workflow file for this run

name: pull request
on:
pull_request:
branches:
- master
- main
jobs:
build:
runs-on: ubuntu-latest
name: build
steps:
- name: set repo name
shell: bash
run: |
echo "REPOSITORY_NAME=$(basename $GITHUB_REPOSITORY)" >> $GITHUB_ENV
- name: Set up Go 1.x
uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 # v2
with:
go-version: ^1.16
- name: Check out code into the Go module directory
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
# - uses: shivanshs9/setup-k8s-operator-sdk@v1
# with:
# version: "1.9.0" # The operator-sdk version to download (if necessary) and use.
- name: Download operator sdk
shell: bash
env:
RELEASE_VERSION: v1.13.1
run: |
curl -LO https://github.com/operator-framework/operator-sdk/releases/download/${RELEASE_VERSION}/operator-sdk_linux_amd64
chmod +x operator-sdk_linux_amd64
mkdir ${HOME}/bin
mv operator-sdk_linux_amd64 ${HOME}/bin/operator-sdk
echo "${HOME}/bin" >> $GITHUB_PATH
- name: build code
shell: bash
run: make VERSION=latest
- name: build bundle
shell: bash
run: make bundle IMG=quay.io/${{ github.repository_owner }}/$(basename $GITHUB_REPOSITORY):0.0.1 VERSION=0.0.1 DEFAULT_CHANNEL=alpha
- name: verify bundle
shell: bash
run: operator-sdk bundle validate ./bundle --select-optional name=operatorhub
- name: build chart
shell: bash
run: make helmchart VERSION=0.0.1 IMG=quay.io/${{ github.repository_owner }}/$(basename $GITHUB_REPOSITORY):0.0.1
- name: Set up QEMU
uses: docker/setup-qemu-action@27d0a4f181a40b142cce983c5393082c365d1480 # v1
with:
platforms: all
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f211e3e9ded2d9377c8cadc4489a4e38014bc4c9 # v1
- name: "Build Operator Image"
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a # v2
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64,linux/ppc64le
push: false
tags: "quay.io/${{ github.repository_owner }}/${{ env.REPOSITORY_NAME }}:v0.0.1"
- name: "Build Bundle Image"
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a # v2
with:
context: .
file: ./bundle.Dockerfile
platforms: linux/amd64,linux/arm64,linux/ppc64le
push: false
tags: "quay.io/${{ github.repository_owner }}/${{ env.REPOSITORY_NAME }}-bundle:0.0.1"