Skip to content

update kn plugin func related image reference (#2655) #92

update kn plugin func related image reference (#2655)

update kn plugin func related image reference (#2655) #92

---
name: Generate CI config
on:
push:
branches:
- 'release-**'
workflow_dispatch: # Manual workflow trigger
inputs:
branch:
required: true
description: "SO branch"
tag:
required: true
description: "Promotion tag"
jobs:
generate-ci:
name: generate-ci
runs-on: ubuntu-latest
env:
GOPATH: ${{ github.workspace }}
steps:
- name: Setup Golang
uses: actions/setup-go@v5
with:
go-version: 1.21.x
- name: Checkout openshift-knative/serverless-operator
uses: actions/checkout@v4
with:
path: ./src/github.com/openshift-knative/serverless-operator
- name: Install yq
run: |
go install github.com/mikefarah/yq/v3@latest
- name: Checkout openshift-knative/hack
uses: actions/checkout@v4
with:
repository: 'openshift-knative/hack'
ref: 'main'
path: ./src/github.com/openshift-knative/hack
- name: Checkout openshift/release
uses: actions/checkout@v4
with:
branch: 'master'
repository: 'openshift/release'
path: ./src/github.com/openshift-knative/hack/openshift/release
- name: Configure Git user
run: |
git config --global user.email "[email protected]"
git config --global user.name "OpenShift Serverless"
- name: Generate CI (on workflow dispatch)
if: github.event_name == 'workflow_dispatch'
working-directory: ./src/github.com/openshift-knative/hack
run: go run ./cmd/prowcopy --from-branch ${{ github.ref_name }} --branch ${{ inputs.branch }} --tag ${{ inputs.tag }} --config config/serverless-operator.yaml
- name: Generate CI (on branch created)
if: github.event_name == 'push' && github.event.created
working-directory: ./src/github.com/openshift-knative/hack
run: go run ./cmd/prowcopy --branch ${{ github.ref_name }} --tag "release-$(yq read ../serverless-operator/olm-catalog/serverless-operator/project.yaml 'project.version')" --config config/serverless-operator.yaml
- name: Generate CI (on push)
if: github.event_name == 'push' && github.event.created == false
working-directory: ./src/github.com/openshift-knative/hack
run: go run ./cmd/prowcopy --from-branch ${{ github.ref_name }} --branch ${{ github.ref_name }} --tag "release-$(yq read ../serverless-operator/olm-catalog/serverless-operator/project.yaml 'project.version')" --config config/serverless-operator.yaml
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.SERVERLESS_QE_ROBOT }}
path: ./src/github.com/openshift-knative/hack/openshift/release
branch: generate-openshift-knative-serverless-operator-${{ github.ref_name }}-ci-config
title: "[${{ github.ref_name }}] Initialize Serverless Operator CI config"
commit-message: "[${{ github.ref_name }}] Initialize Serverless Operator CI config"
push-to-fork: serverless-qe/release
delete-branch: true
body: |
Serverless Operator CI config for ${{ github.ref_name }}.