Skip to content

Commit

Permalink
Add merge step
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanjjung committed Sep 30, 2024
1 parent 7c327ca commit 2edbbac
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
---
# These jobs are run anytime a PR is opened against the main branch. In brief, to get a PR merged, you must:
# - Update the version number in pyproject.toml
# - Not have any linting issues (run `ruff format`)

name: validate

concurrency:
group: validate
cancel-in-progress: true

#
on:
pull_request:
branches:
Expand Down Expand Up @@ -74,16 +78,18 @@ jobs:
src: './tb_pulumi'
args: 'format --check'

# Cut a new branch if there isn't one with this version number
# cut-version-branch:
# needs: detect-versions
# runs-on: ubuntu-latest
# permissions:
# contents: write
# if: needs.detect-versions.outputs.branch-exists == 'false'
# steps:
# - name: Create a new version branch
# uses: peterjgrainger/[email protected]
# with:
# branch: ${{ needs.detect-versions.outputs.version }}
# sha: ${{ github.event.pull_request.head.sha }}
# If the PR gets merged, cut a new version branch
merge:
needs: detect-versions
if: github.event.pull_request.merged == true && needs.detect-versions.outputs.branch-exists == 'false'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4

- name: Create a new version branch
uses: peterjgrainger/[email protected]
with:
branch: ${{ needs.detect-versions.outputs.version }}
sha: ${GITHUB_SHA}

0 comments on commit 2edbbac

Please sign in to comment.