Skip to content

Apply release

Apply release #14

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@v2
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install poetry
uses: abatilo/actions-poetry@v2
- name: Get package version
id: get-version
run: |
version=$(poetry search port-ocean | grep port-ocean | sed 's/.*(\(.*\))/\1/')
pr_name="Release ${version}"
branch_name="release-${version}"
echo "Branch Name: $branch_name"
echo "PR Name: $pr_name"
git checkout -b $branch_name
echo "VERSION=$version" >> $GITHUB_OUTPUT
echo "BRANCH_NAME=$branch_name" >> $GITHUB_OUTPUT
echo "PR_NAME=$pr_name" >> $GITHUB_OUTPUT
- name: Apply changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
echo "Installing all integrations"
make install/all
echo "Finished installing all integrations"
applied_version="^${{ steps.get-version.outputs.VERSION }}"
echo "apply version: $applied_version"
./scripts/bump-all.sh $applied_version
echo "Finished applying changes"
echo "Pushing changes to branch ${{ steps.get-version.outputs.VERSION }}"
git push --set-upstream origin ${{ steps.get-version.outputs.VERSION }}
- name: Open pull request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Propose changes"
title: ${{ steps.get-version.outputs.PR_NAME }}
body: "This pull request includes changes made in the feature branch."
branch: ${{ steps.get-version.outputs.BRANCH_NAME }}