Skip to content

Apply release

Apply release #194

Workflow file for this run

name: Apply release
on:
workflow_run:
workflows:
- Release framework
types:
- completed
workflow_dispatch:
jobs:
create_branch_and_open_pr:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Get package version
id: version
run: |
version=$(pip index versions port-ocean | grep 'port-ocean' | cut -d' ' -f2 | tr -d '()')
pr_name="[Integration] Apply Ocean version $version to all integrations"
branch_name="apply-ocean-$version-to-all-integrations"
echo "Branch Name: $branch_name"
echo "PR Name: $pr_name"
echo "pr_name=$pr_name" >> $GITHUB_OUTPUT
echo "branch_name=$branch_name" >> $GITHUB_OUTPUT
echo "version=$version" >> $GITHUB_OUTPUT
- name: Apply changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
./scripts/bump-all.sh ${{ steps.version.outputs.version }}
- name: Open pull request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.MACHINE_USER_TOKEN }}
title: ${{ steps.version.outputs.pr_name }}
branch: ${{ steps.version.outputs.branch_name }}
base: main
body: |
This PR was automatically created by a GitHub Action.
## What does this PR do?
Apply Ocean version ${{ steps.version.outputs.version }} to all integrations
## How should this be manually tested?
./scripts/bump-all.sh ^${{ steps.version.outputs.version }}