Switch to Node 20 LTS (#2564) #72
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
--- | |
name: Generate CI config | |
on: | |
push: | |
branches: | |
- 'release-**' | |
workflow_dispatch: # Manual workflow trigger | |
inputs: | |
branch: | |
required: true | |
description: "SO branch" | |
jobs: | |
generate-ci: | |
if: github.event.created || github.event_name == 'workflow_dispatch' | |
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: Install prerequisites | |
env: | |
YQ_VERSION: 3.4.0 | |
run: | | |
sudo wget https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64 -O /usr/bin/yq | |
sudo chmod +x /usr/bin/yq | |
sudo mv /usr/bin/yq /usr/local/bin/yq | |
- name: Checkout openshift-knative/serverless-operator | |
uses: actions/checkout@v4 | |
with: | |
path: ./src/github.com/openshift-knative/serverless-operator | |
- 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 --branch ${{ inputs.branch }} --tag ${{ inputs.branch }} --config config/serverless-operator.yaml | |
- name: Generate CI (on branch created) | |
if: github.event.created | |
working-directory: ./src/github.com/openshift-knative/hack | |
run: go run ./cmd/prowcopy --branch ${{ github.ref_name }} --tag ${{ github.ref_name }} --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 }}. |