rename-project-create-pr #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: rename-project-create-pr | |
on: | |
workflow_dispatch: | |
inputs: | |
product_id: | |
description: 'Product ID: provide an ID for the product this app/component belongs too. Refer to the developer portal.' | |
required: true | |
slack_releases_channel: | |
description: 'Slack channel for release notifications.' | |
required: true | |
pipeline_security_slack_channel: | |
description: 'Slack channel for pipeline security notifications.' | |
required: true | |
non_prod_alerts_prometheus_severity_label: | |
description: 'Non-prod k8s alerts. The severity label used by prometheus to route alert notifications to slack. See cloud-platform user guide.' | |
required: true | |
default: 'digital-prison-service-dev' | |
prod_alerts_prometheus_severity_label: | |
description: 'Production k8s alerts. The severity label used by prometheus to route alert notifications to slack. See cloud-platform user guide.' | |
required: true | |
default: 'digital-prison-service' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run rename-project script | |
run: ./rename-project.bash ${{ github.event.repository.name }} ${{ inputs.slack_releases_channel }} ${{ inputs.pipeline_security_slack_channel }} ${{ inputs.non_prod_alerts_prometheus_severity_label }} ${{ inputs.prod_alerts_prometheus_severity_label }} ${{ inputs.product_id }} | |
- name: Delete this github actions workflow | |
run: rm .github/workflows/rename_template_project* | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
commit-message: updating project name after deployment from template repository | |
title: Update template project name/references | |
body: Update all references to project name after deploying from template repository | |
branch: rename_template_project | |
base: main |