1111 description : " Optional. The comment-id of the slash command. Used to update the comment with the status."
1212 required : false
1313
14- type :
15- description : " The type of bump to perform. One of 'major', 'minor', or 'patch'."
16- required : false
17- default : " patch"
18-
1914 changelog :
2015 description : " Optional. The comment to add to the changelog. If not provided, the PR title will be used."
2116 required : false
3126 description : " Ref (Ignored)"
3227 required : false
3328
29+ permissions :
30+ contents : read
31+ issues : write
32+ pull-requests : write
33+
3434run-name : " Bump connector version for progressive rollout in PR: #${{ github.event.inputs.pr }}"
3535concurrency :
3636 group : ${{ github.workflow }}-${{ github.event.inputs.pr }}
@@ -39,140 +39,12 @@ concurrency:
3939
4040jobs :
4141 bump-progressive-rollout-version :
42- name : " Bump version of connectors for progressive rollout in this PR"
43- runs-on : ubuntu-24.04
44- steps :
45- - name : Get job variables
46- id : job-vars
47- env :
48- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
49- shell : bash
50- run : |
51- PR_JSON=$(gh api repos/${{ github.repository }}/pulls/${{ github.event.inputs.pr }})
52- echo "repo=$(echo "$PR_JSON" | jq -r .head.repo.full_name)" >> $GITHUB_OUTPUT
53- echo "branch=$(echo "$PR_JSON" | jq -r .head.ref)" >> $GITHUB_OUTPUT
54- echo "pr_title=$(echo "$PR_JSON" | jq -r .title)" >> $GITHUB_OUTPUT
55- echo "run-url=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_OUTPUT
56-
57- # NOTE: We still use a PAT here (rather than a GitHub App) because the workflow needs
58- # permissions to add commits to our main repo as well as forks. This will only work on
59- # forks if the user installs the app into their fork. Until we document this as a clear
60- # path, we will have to keep using the PAT.
61- - name : Checkout Airbyte
62- uses : actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
63- with :
64- repository : ${{ steps.job-vars.outputs.repo }}
65- ref : ${{ steps.job-vars.outputs.branch }}
66- fetch-depth : 1
67- # Important that token is a PAT so that CI checks are triggered again.
68- # Without this we would be forever waiting on required checks to pass.
69- token : ${{ secrets.GH_PAT_APPROVINGTON_OCTAVIA }}
70-
71- - name : Append comment with job run link
72- # If comment-id is not provided, this will create a new
73- # comment with the job run link.
74- id : first-comment-action
75- uses : peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
76- with :
77- comment-id : ${{ github.event.inputs.comment-id }}
78- issue-number : ${{ github.event.inputs.pr }}
79- body : |
80-
81- > **Progressive Rollout Version Bump Started**
82- >
83- > This will bump the connector version with an RC suffix and enable progressive rollout.
84- > [Check job output.][1]
85-
86- [1]: ${{ steps.job-vars.outputs.run-url }}
87-
88- - name : Log changelog source
89- run : |
90- if [ -n "${{ github.event.inputs.changelog }}" ]; then
91- echo "Using user-provided changelog: ${{ github.event.inputs.changelog }}"
92- else
93- echo "Using PR title as changelog: ${{ steps.job-vars.outputs.pr_title }}"
94- fi
95-
96- - name : Run airbyte-ci connectors --modified bump-version with --rc flag
97- uses : ./.github/actions/run-airbyte-ci
98- continue-on-error : true
99- with :
100- context : " manual"
101- gcs_credentials : ${{ secrets.METADATA_SERVICE_PROD_GCS_CREDENTIALS }}
102- sentry_dsn : ${{ secrets.SENTRY_AIRBYTE_CI_DSN }}
103- github_token : ${{ secrets.GH_PAT_APPROVINGTON_OCTAVIA }}
104- git_repo_url : https://github.com/${{ steps.job-vars.outputs.repo }}.git
105- subcommand : |
106- connectors --modified bump-version \
107- ${{ github.event.inputs.type }} \
108- "${{ github.event.inputs.changelog != '' && github.event.inputs.changelog || steps.job-vars.outputs.pr_title }}" \
109- --pr-number ${{ github.event.inputs.pr }} \
110- --rc
111-
112- # This is helpful in the case that we change a previously committed generated file to be ignored by git.
113- - name : Remove any files that have been gitignored
114- run : git ls-files -i -c --exclude-from=.gitignore | xargs -r git rm --cached
115-
116- # Check for changes in git
117- - name : Check for changes
118- id : git-diff
119- run : |
120- git diff --quiet && echo "No changes to commit" || echo "changes=true" >> $GITHUB_OUTPUT
121- shell : bash
122-
123- # Commit changes (if any)
124- - name : Commit changes
125- id : commit-step
126- if : steps.git-diff.outputs.changes == 'true'
127- run : |
128- git config --global user.name "Octavia Squidington III"
129- git config --global user.email "octavia-squidington-iii@users.noreply.github.com"
130- git add .
131- git commit -m "chore: bump-version for progressive rollout"
132- echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
133-
134- - name : Push changes to '(${{ steps.job-vars.outputs.repo }})'
135- if : steps.git-diff.outputs.changes == 'true'
136- run : |
137- git remote add contributor https://github.com/${{ steps.job-vars.outputs.repo }}.git
138- git push contributor HEAD:'${{ steps.job-vars.outputs.branch }}'
139-
140- - name : Append success comment
141- uses : peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
142- if : steps.git-diff.outputs.changes == 'true'
143- with :
144- comment-id : ${{ steps.first-comment-action.outputs.comment-id }}
145- reactions : hooray
146- body : |
147- > **Progressive Rollout Version Bump: SUCCESS**
148- >
149- > The connector version has been bumped with an RC suffix (e.g., `X.Y.Z-rc.1`).
150- > Changes applied successfully. (${{ steps.commit-step.outputs.sha }})
151- >
152- > **Next steps:**
153- > 1. Merge this PR to publish the RC version
154- > 2. Monitor the progressive rollout in production
155- > 3. When ready to promote, use the `finalize_rollout` workflow with `action=promote`
156- > 4. If issues arise, use `action=rollback` instead
157-
158- - name : Append success comment (no-op)
159- uses : peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
160- if : steps.git-diff.outputs.changes != 'true'
161- with :
162- comment-id : ${{ steps.first-comment-action.outputs.comment-id }}
163- reactions : " -1"
164- body : |
165- > Job completed successfully (no changes detected).
166- >
167- > This might happen if:
168- > - The connector already has an RC version
169- > - No modified connectors were detected in this PR
170-
171- - name : Append failure comment
172- uses : peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
173- if : failure()
174- with :
175- comment-id : ${{ steps.first-comment-action.outputs.comment-id }}
176- reactions : confused
177- body : |
178- > Job failed. Check the [workflow logs](${{ steps.job-vars.outputs.run-url }}) for details.
42+ # Delegate to the bump-version workflow with type=rc.
43+ uses : ./.github/workflows/bump-version-command.yml
44+ with :
45+ pr : ${{ github.event.inputs.pr }}
46+ comment-id : ${{ github.event.inputs.comment-id }}
47+ type : " rc"
48+ changelog : ${{ github.event.inputs.changelog }}
49+ secrets :
50+ GH_PAT_APPROVINGTON_OCTAVIA : ${{ secrets.GH_PAT_APPROVINGTON_OCTAVIA }}
0 commit comments