Skip to content

Update Pregenerated Charts #648

Update Pregenerated Charts

Update Pregenerated Charts #648

# This is a basic workflow to help you get started with Actions
name: Update Pregenerated Charts
# Controls when the action will run.
on:
# Runs every six hours
schedule:
- cron: "0 */6 * * *"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
fail-fast: false # If one jobs fail, we still want the other jobs to run.
matrix:
python-version: [3.9]
branch: ['main', 'release-2.10', 'release-2.11', 'release-2.12']
include:
- branch: release-2.10
go-version: "1.20"
- branch: release-2.11
go-version: "1.21"
- branch: release-2.12
go-version: "1.22"
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
with:
token: ${{ secrets.HUB_OPERATOR_TOKEN }}
ref: ${{ matrix.branch }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }} # Specify the Go version from the matrix
# Runs a set of commands using the runners shell
- name: Copy Charts for Operator Bundles
run: |
make copy-charts
exit_code=$?
if [ $exit_code -ne 0 ]; then
echo "Regenerate Operator Bundles step failed with exit code $exit_code"
exit $exit_code
fi
- name: Generate code
run: |
echo "Running go generate..."
go generate
- name: Generate Manifests
run: |
echo "Generating manifests..."
make manifests
- name: Send Slack Message on Failure
if: ${{ failure() }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
run: |
SLACK_MESSAGE=":exclamation: *GitHub Actions Job Failed* :exclamation:\n\n"
SLACK_MESSAGE+="Job Name: $GITHUB_WORKFLOW/$GITHUB_JOB\n"
SLACK_MESSAGE+="Job URL: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID\n"
SLACK_MESSAGE+="Error Details: Your job failed. Please check the job logs for more information."
curl -X POST -H "Content-type: application/json" --data "{
\"text\": \"$SLACK_MESSAGE\"
}" $SLACK_WEBHOOK_URL
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
signoff: true
branch: "regenerate-copy-chart-${{ matrix.branch }}"
delete-branch: true
title: "Operator Chart Copy Update [${{ matrix.branch }}]"
committer: GitHub <[email protected]>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
labels: |
do-not-merge/hold
ok-to-test
reviewers: cameronmwall,dislbenn,ngraham20