Skip to content

Commit

Permalink
build approved prs (#45)
Browse files Browse the repository at this point in the history
* rename

* build on approved PRs

* add pr in version

---------

Co-authored-by: Ryan Bucshon <[email protected]>
  • Loading branch information
busheezy and busheezy authored Nov 20, 2023
1 parent cfbb5d2 commit 04d2826
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/build-approved-prs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Approved PR check

on:
pull_request_review:
types:
- submitted

jobs:
get-version-string:
name: Get version string
if: github.event.review.state == 'APPROVED'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set vars
id: vars
run: |
echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
outputs:
short_sha: ${{ steps.vars.outputs.short_sha }}

build:
name: Build
if: github.event.review.state == 'APPROVED'
uses: ./.github/workflows/build.yaml
needs: get-version-string
with:
version: ${{ github.ref_name }}-pr-${{ needs.get-version-string.outputs.short_sha }}
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 04d2826

Please sign in to comment.