Skip to content

Merge pull request #722 from humio/mike/release_0.20.0 #42

Merge pull request #722 from humio/mike/release_0.20.0

Merge pull request #722 from humio/mike/release_0.20.0 #42

on:
push:
branches:
- master
paths:
- VERSION
name: Publish Container Image Release
jobs:
build-and-publish:
name: Test, Build and Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set version information
run: |
echo "RELEASE_VERSION=$(cat VERSION)" >> $GITHUB_ENV
echo "RELEASE_COMMIT=$(git rev-parse --verify HEAD)" >> $GITHUB_ENV
echo "RELEASE_DATE=$(date --iso-8601=seconds)" >> $GITHUB_ENV
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: docker build
run: make docker-build-operator IMG=humio/humio-operator:${{ env.RELEASE_VERSION }} IMG_BUILD_ARGS="--label version=${{ env.RELEASE_VERSION }} --label release=${{ github.run_id }} --build-arg RELEASE_VERSION=${{ env.RELEASE_VERSION }} --build-arg RELEASE_COMMIT=${{ env.RELEASE_COMMIT }} --build-arg RELEASE_DATE=${{ env.RELEASE_DATE }}"
- name: Set up Python
uses: actions/setup-python@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install six
- name: CrowdStrike Container Image Scan Operator
uses: crowdstrike/container-image-scan-action@v1
with:
falcon_client_id: 1cd30708cb31442f85a6eec83279fe7b
container_repository: humio/humio-operator
container_tag: ${{ env.RELEASE_VERSION }}
env:
FALCON_CLIENT_SECRET: "${{ secrets.FALCON_CLIENT_SECRET }}"
- name: docker push
run: make docker-push IMG=humio/humio-operator:${{ env.RELEASE_VERSION }}
# Disable olm push until we have a new bundle
# - name: operator-courier push
# env:
# GO111MODULE: "on"
# QUAY_ACCESS_TOKEN: ${{ secrets.QUAY_ACCESS_TOKEN }}
# QUAY_NAMESPACE: ${{ secrets.QUAY_NAMESPACE }}
# uses: ./.github/action/operator-sdk
# with:
# args: operator-courier push deploy/olm-catalog/humio-operator ${{ env.QUAY_NAMESPACE }} humio-operator ${{ env.RELEASE_VERSION }} "basic ${{ env.QUAY_ACCESS_TOKEN }}"
gh-release:
name: Create GitHub Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get release version
run: echo "RELEASE_VERSION=$(cat VERSION)" >> $GITHUB_ENV
- uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: operator-${{ env.RELEASE_VERSION }}
release_name: Operator Release ${{ env.RELEASE_VERSION }}
body: |
**Image:** `humio/humio-operator:${{ env.RELEASE_VERSION }}`
**Upgrade notes:** https://library.humio.com/falcon-logscale/installation-kubernetes-operator-upgrade.html#installation-containers-kubernetes-operator-upgrade-notes
prerelease: true