Skip to content

Commit 0c17cc3

Browse files
authored
fix: change name of input
1 parent f2fdee2 commit 0c17cc3

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

.github/workflows/upstream-sync.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ name: Upstream Sync Workflow
33
'on':
44
workflow_call:
55
inputs:
6-
branch:
7-
description: "OpenStack release name you wish to sync against, for example; xena or wallaby"
6+
release-series:
7+
description: "OpenStack release series you wish to sync against, for example; xena, wallaby or victoria"
88
required: true
99
type: string
1010
jobs:
@@ -14,7 +14,7 @@ jobs:
1414
downstream-prefix: stackhpc
1515
upstream-prefix: openstack:stable
1616
steps:
17-
- name: Check if ${{ format('{0}/{1}', env.upstream-prefix, inputs.branch) }} is ahead of ${{ format('{0}/{1}', env.downstream-prefix, inputs.branch) }}
17+
- name: Check if ${{ format('{0}/{1}', env.upstream-prefix, inputs.release-series) }} is ahead of ${{ format('{0}/{1}', env.downstream-prefix, inputs.release-series) }}
1818
uses: actions/github-script@9ac08808f993958e9de277fe43a64532a609130e
1919
id: check-if-ahead
2020
with:
@@ -23,8 +23,8 @@ jobs:
2323
const result = await github.rest.repos.compareCommits({
2424
owner,
2525
repo,
26-
head: '${{ format('{0}/{1}', env.upstream-prefix, inputs.branch) }}',
27-
base: '${{ format('{0}/{1}', env.downstream-prefix, inputs.branch) }}',
26+
head: '${{ format('{0}/{1}', env.upstream-prefix, inputs.release-series) }}',
27+
base: '${{ format('{0}/{1}', env.downstream-prefix, inputs.release-series) }}',
2828
});
2929
return result.data['ahead_by'] > 0 ? 'true' : 'false';
3030
result-encoding: string
@@ -38,7 +38,7 @@ jobs:
3838
const result = await github.rest.repos.getCommit({
3939
owner: '${{ format('openstack') }}',
4040
repo: repo,
41-
ref: '${{ format('{0}/{1}', 'stable', inputs.branch) }}',
41+
ref: '${{ format('{0}/{1}', 'stable', inputs.release-series) }}',
4242
});
4343
return result.data['sha'];
4444
}
@@ -52,7 +52,7 @@ jobs:
5252
const { repo, owner } = context.repo;
5353
const date = new Date();
5454
const prDate = `${date.getFullYear()}-${date.getMonth()}-${date.getDay()}`;
55-
const branchName = '${{ format('upstream-{0}-', inputs.branch) }}' + prDate;
55+
const branchName = '${{ format('upstream-{0}-', inputs.release-series) }}' + prDate;
5656
const result = await github.rest.git.createRef({
5757
owner,
5858
repo,
@@ -62,21 +62,21 @@ jobs:
6262
return branchName;
6363
}
6464
result-encoding: string
65-
- name: Create PR ${{ format('{0}/{1}', env.downstream-prefix, inputs.branch) }} with ${{ steps.branch-name.outputs.result }}
65+
- name: Create PR ${{ format('{0}/{1}', env.downstream-prefix, inputs.release-series) }} with ${{ steps.branch-name.outputs.result }}
6666
uses: actions/github-script@9ac08808f993958e9de277fe43a64532a609130e
6767
with:
6868
script: |
6969
if(${{ steps.check-if-ahead.outputs.result }} == true) {
7070
const { repo, owner } = context.repo;
7171
const result = await github.rest.pulls.create({
72-
title: 'Synchronise ${{ inputs.branch }} with ${{ steps.branch-name.outputs.result }}',
72+
title: 'Synchronise ${{ inputs.release-series }} with ${{ steps.branch-name.outputs.result }}',
7373
owner,
7474
repo,
7575
head: '${{ steps.branch-name.outputs.result }}',
76-
base: '${{ format('{0}/{1}', env.downstream-prefix, inputs.branch) }}',
76+
base: '${{ format('{0}/{1}', env.downstream-prefix, inputs.release-series) }}',
7777
maintainer_can_modify: false,
7878
body: [
79-
'The changes from ${{ env.upstream-prefix }}/${{ inputs.branch }} have been included in this automated PR'
79+
'The changes from ${{ env.upstream-prefix }}/${{ inputs.release-series }} have been included in this automated PR'
8080
].join('\n')
8181
});
8282
}

0 commit comments

Comments
 (0)