Skip to content

Create integration promotion pull request #19

Create integration promotion pull request

Create integration promotion pull request #19

Workflow file for this run

name: Move to Next Env
on:
workflow_dispatch:
permissions:
read: all
write: all
jobs:
create-pull-request:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Determine Source and Target Branch
id: branches
run: |
if [[ "${GITHUB_REF}" == "refs/heads/develop" ]]; then
echo "source=develop" >> $GITHUB_ENV
echo "target=integration" >> $GITHUB_ENV
elif [[ "${GITHUB_REF}" == "refs/heads/integration" ]]; then
echo "source=integration" >> $GITHUB_ENV
echo "target=main" >> $GITHUB_ENV
else
echo "Invalid source branch"
exit 1
fi
shell: bash
- name: Make changes to pull request
run: date +%s > report.txt
- name: Create Pull Request
id: create_pr
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update report
committer: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>
author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: pr-${{ env.source }}-to-${{ env.target }}
delete-branch: true
title: '[Example] Update report'
body: |
Update report
- Updated with *today's* date
- Auto-generated by [create-pull-request](https://github.com/peter-evans/create-pull-request)
labels: |
automerge
automated pr
assignees: karimfaiz
reviewers: karimfaiz
#team-reviewers: |
# developers
# qa-team
milestone: 1
draft: false