Merge pull request #716 from lunarway/fix-humioclustercontroller-erro… #497
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
on: | |
push: | |
branches: | |
- master | |
name: Publish Master | |
jobs: | |
build-and-publish-operator: | |
name: Build and Publish Operator | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# Disable olm checks until we have a new bundle we want to validate against | |
# - name: operator-sdk lint | |
# env: | |
# GO111MODULE: "on" | |
# uses: ./.github/action/operator-sdk | |
# with: | |
# args: operator-courier --verbose verify --ui_validate_io deploy/olm-catalog/humio-operator | |
- name: Set version information | |
run: | | |
echo "RELEASE_VERSION=master" >> $GITHUB_ENV | |
echo "RELEASE_COMMIT=$(git rev-parse --verify HEAD)" >> $GITHUB_ENV | |
echo "RELEASE_DATE=$(date --iso-8601=seconds)" >> $GITHUB_ENV | |
- 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: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: docker tag | |
run: docker tag humio/humio-operator:${{ env.RELEASE_VERSION }} humio/humio-operator:${{ env.RELEASE_COMMIT }} | |
- name: docker push | |
run: | | |
make docker-push IMG=humio/humio-operator:${{ env.RELEASE_VERSION }} | |
make docker-push IMG=humio/humio-operator:${{ env.RELEASE_COMMIT }} | |
build-and-publish-helper: | |
name: Build and Publish Helperimage | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set version information | |
run: | | |
echo "RELEASE_VERSION=master" >> $GITHUB_ENV | |
echo "RELEASE_COMMIT=$(git rev-parse --verify HEAD)" >> $GITHUB_ENV | |
echo "RELEASE_DATE=$(date --iso-8601=seconds)" >> $GITHUB_ENV | |
- name: docker build | |
run: make docker-build-helper IMG=humio/humio-operator-helper:${{ 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 Helper | |
uses: crowdstrike/container-image-scan-action@v1 | |
with: | |
falcon_client_id: 1cd30708cb31442f85a6eec83279fe7b | |
container_repository: humio/humio-operator-helper | |
container_tag: ${{ env.RELEASE_VERSION }} | |
env: | |
FALCON_CLIENT_SECRET: "${{ secrets.FALCON_CLIENT_SECRET }}" | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: docker tag | |
run: docker tag humio/humio-operator-helper:${{ env.RELEASE_VERSION }} humio/humio-operator-helper:${{ env.RELEASE_COMMIT }} | |
- name: docker push | |
run: | | |
make docker-push IMG=humio/humio-operator-helper:${{ env.RELEASE_VERSION }} | |
make docker-push IMG=humio/humio-operator-helper:${{ env.RELEASE_COMMIT }} |