Skip to content

Commit

Permalink
Update warning workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerbutler committed Aug 19, 2024
1 parent 1873d11 commit af1d149
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion .github/workflows/pr-release-branch-warning.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,42 @@
name: Release branch warning
on:
pull_request:
pull_request_target:
types:
- opened
- synchronize

# This is triggered when the base branch changes; handles the case where you open a PR against main then change the
# base branch to a release branch.
- edited
branches:
- release/client/**
- release/server/**
- test/release/**

permissions:
# Needed to write the comments to the PRs themselves
pull-requests: write

jobs:
warning:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # ratchet:actions/checkout@v4
with:
persist-credentials: false
submodules: false

- name: Read warning template file
id: templateFile
uses: juliangruber/read-file-action@b549046febe0fe86f8cb4f93c24e284433f9ab58 # ratchet:juliangruber/read-file-action@v1
with:
path: ${{ github.workspace }}/.github/workflows/data/release-branch-warning.md

- name: Post warning in comment
# release notes: https://github.com/marocchino/sticky-pull-request-comment/releases/tag/v2.9.0
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 # ratchet:marocchino/[email protected]
with:
header: release-warning
path: ${{ github.workspace }}/.github/workflows/data/release-branch-warning.md
# message: ${{ steps.templateFile.outputs.content }}
only_create: true

0 comments on commit af1d149

Please sign in to comment.