Skip to content

Commit

Permalink
feat(ci): pr-validate.yml for pr descriptions (#595)
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekRoberts authored Feb 9, 2024
1 parent 1238acd commit 7d8ce57
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 22 deletions.
23 changes: 1 addition & 22 deletions .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,7 @@ jobs:
pull-requests: write
runs-on: ubuntu-22.04
needs: setup
env:
ZONE: ${{ needs.setup.outputs.zone }}
steps:
- name: PR Greeting
if: github.event.action == 'opened' || github.event.action == 'reopened'
env:
DOMAIN: apps.silver.devops.gov.bc.ca
uses: bcgov-nr/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
add_markdown: |
---
Thanks for the PR!
Any successful deployments (not always required) will be available below.
- [api](https://fom-${{ env.ZONE }}.${{ env.DOMAIN }}/api)
- [admin](https://fom-${{ env.ZONE }}.${{ env.DOMAIN }}/admin)
- [public](https://fom-${{ env.ZONE }}.${{ env.DOMAIN }}/public)
Once merged, code will be promoted and handed off to following workflow run.
- [Main Merge Workflow](https://github.com/${{ github.repository }}/actions/workflows/merge-main.yml)
- name: OpenShift Init
uses: bcgov-nr/[email protected]
with:
Expand All @@ -56,7 +35,7 @@ jobs:
oc_token: ${{ secrets.OC_TOKEN }}
file: libs/openshift.init.yml
overwrite: false
parameters: -p ZONE=${{ env.ZONE }}
parameters: -p ZONE=${{ needs.setup.outputs.zone }}
triggers: ('db/' 'libs/' 'api/' 'admin/' 'public/')

builds:
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/pr-validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: PR Validate

on:
pull_request:
types: [edited, opened, reopened, synchronize]

concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}
cancel-in-progress: true

jobs:
pr-description-add:
name: PR Description Add
env:
DOMAIN: apps.silver.devops.gov.bc.ca
PREFIX: ${{ github.event.repository.name }}
runs-on: ubuntu-22.04
permissions:
pull-requests: write
timeout-minutes: 1
steps:
- name: Get FAM Route
id: fam
run: echo "route=$(( ${{ github.event.number }} % 50 ))" >> $GITHUB_OUTPUT

- uses: bcgov-nr/[email protected]
env:
DOMAIN: apps.silver.devops.gov.bc.ca
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
add_markdown: |
---
Thanks for the PR!
Any successful deployments (not always required) will be available below.
- [api](https://fom-${{ steps.fam.outputs.route }}.${{ env.DOMAIN }}/api)
- [admin](https://fom-${{ steps.fam.outputs.route }}.${{ env.DOMAIN }}/admin)
- [public](https://fom-${{ steps.fam.outputs.route }}.${{ env.DOMAIN }}/public)
Once merged, code will be promoted and handed off to following workflow run.
- [Main Merge Workflow](https://github.com/${{ github.repository }}/actions/workflows/merge-main.yml)

0 comments on commit 7d8ce57

Please sign in to comment.