Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Deploy Forge App to Jira

on:
pull_request:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 suggestion (security): Consider adding a condition to ensure pull request deployments only run on PRs from the same repository

Pull requests from forks could potentially expose sensitive deployment credentials. Add 'if: github.event.pull_request.head.repo.full_name == github.repository' to the job level.

branches:
- main
push:
branches:
- main
Expand Down Expand Up @@ -47,4 +50,15 @@ jobs:
# Deploy Forge App
# https://developer.atlassian.com/platform/forge/staging-and-production-apps/#deploy-to-a-specific-environment
- name: Deploy Forge App
run: forge deploy -e production
run: |
if [ "${{ github.event_name }}" == "push" ]; then
forge deploy -e production
else
forge deploy -e staging
fi

# Install Forge app dependencies
# https://developer.atlassian.com/platform/forge/cli-reference/install/
- name: Install Forge dependencies
if: github.event_name == 'pull_request'
run: forge install -e staging -s gitauto.atlassian.net --p Jira --upgrade --confirm-scopes --non-interactive --verbose
Loading