Skip to content

Commit 2f103b5

Browse files
committed
Promote pull request github action
1 parent d648626 commit 2f103b5

File tree

3 files changed

+70
-0
lines changed

3 files changed

+70
-0
lines changed

.github/workflows/foo.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Foo
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
call-build-workflow:
8+
uses: dprince/openstack-operator/.github/workflows/promote-pull-request.yaml@promotion_action
9+
with:
10+
operator_name: openstack
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Promote k8s operator dependencies
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
operator_name:
7+
required: true
8+
type: string
9+
branch_name:
10+
default: 'main'
11+
type: string
12+
13+
jobs:
14+
15+
promote:
16+
name: Generate a pull request to promote the latest openstack-k8s-operators dependencies
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v4
22+
23+
- name: Git config
24+
run: |
25+
git config user.name "openstack-k8s-operators-ci"
26+
git config user.email "[email protected]"
27+
28+
- name: run make force-bump, tidy, manifests, generate
29+
shell: bash
30+
run: |
31+
make force-bump
32+
make tidy
33+
make manifests generate
34+
35+
- name: run make bindata
36+
if: inputs.operator_name == 'openstack'
37+
shell: bash
38+
run: |
39+
BRANCH='${{ inputs.branch_name }}' make bindata
40+
41+
- name: Create Pull Request
42+
uses: peter-evans/create-pull-request@v7
43+
with:
44+
title: "openstack-k8s-operators dependency bump branch: ${{ github.ref_name }}"
45+
branch: "openstack-dependency-bump/${{ github.ref_name }}" # always use the same branch

.github/workflows/test.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
schedule:
8+
- cron: '0 * * * *'
9+
workflow_dispatch:
10+
11+
jobs:
12+
call-build-workflow:
13+
uses: dprince/openstack-operator/.github/workflows/promote-pull-request.yaml@promotion_action
14+
with:
15+
operator_name: openstack

0 commit comments

Comments
 (0)