Skip to content

Commit

Permalink
Use pr-validate with shared workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekRoberts committed Nov 20, 2024
1 parent 08ea154 commit 2dc68de
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 27 deletions.
28 changes: 1 addition & 27 deletions .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,6 @@ concurrency:
cancel-in-progress: true

jobs:
pr-greeting:
name: PR Greeting
if: github.event.action == 'opened' || github.event.action == 'reopened'
env:
DOMAIN: apps.silver.devops.gov.bc.ca
PREFIX: ${{ github.event.repository.name }}-${{ github.event.number }}
runs-on: ubuntu-24.04
permissions:
pull-requests: write
steps:
- name: PR Greeting
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.
[Backend](https://${{ env.PREFIX }}-backend.${{ env.DOMAIN }}/api) available
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)
builds:
name: Builds
runs-on: ubuntu-24.04
Expand Down Expand Up @@ -62,8 +37,7 @@ jobs:

deploys:
name: Deploys
needs:
- builds
needs: builds
runs-on: ubuntu-24.04
strategy:
matrix:
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/pr-validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: PR Validate

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

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

jobs:
validate:
name: Validate PR
uses: bcgov/quickstart-openshift-helpers/.github/workflows/[email protected]
with:
markdown_links: |
- [Backend](https://${{ github.event.repository.name }}-${{ github.event.number }}-backend.apps.silver.devops.gov.bc.ca/api) available
results:
name: Validate Results
if: always() && (!failure()) && (!cancelled())
needs: [validate]
runs-on: ubuntu-24.04
steps:
- run: echo "Success!"

0 comments on commit 2dc68de

Please sign in to comment.