Skip to content

Commit

Permalink
Improving GitHub Action to mention the related PR
Browse files Browse the repository at this point in the history
  • Loading branch information
Heshdude committed Aug 9, 2020
1 parent b46d93a commit 5502849
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@master
- name: Get the list of modified files only
- name: Get the list of modified installers only
uses: technote-space/get-diff-action@v1
with:
PREFIX_FILTER: |
Expand All @@ -22,12 +22,28 @@ jobs:
- name: Minify generated installers
run: ./minify.sh ${{ env.GIT_DIFF }}
if: env.GIT_DIFF
- name: Find the Related PR
if: env.GIT_DIFF
uses: jwalton/gh-find-current-pr@v1
id: findPr
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Related PR
if: env.GIT_DIFF && success() && steps.findPr.outputs.number
id: vars
run: |
echo "The related PR is ${PR}"
echo ::set-output name=pr_body::"#${PR}"
env:
PR: ${{ steps.findPr.outputs.pr }}
- name: Create a pull request for README.md & installers.toml updates
uses: peter-evans/create-pull-request@v3
with:
commit-message: update README.md & installers.toml
title: Update README.md & installers.toml
body: Update README.md & installers.toml for the changes to the installer scripts
title: Update installer scrits, README.md & installers.toml
body: |
Update README.md & installers.toml for the changes to the installer scripts.
This is a generated PR in related to PR ${{ steps.vars.outputs.pr_body }}
branch: update-readme-md-and-installers-toml
if: env.GIT_DIFF
- name: Archive Production Artifact
Expand All @@ -44,11 +60,17 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@master
- name: Get the list of modified installers only
uses: technote-space/get-diff-action@v1
with:
PREFIX_FILTER: |
installers
- name: Download Artifact
uses: actions/download-artifact@master
with:
name: installers
path: installers
if: env.GIT_DIFF
- name: Install Dependencies
run: cd functions && npm install
- name: Deploy to Firebase
Expand Down

0 comments on commit 5502849

Please sign in to comment.