-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create android-branch-deploy.yml (ref #608)
- Loading branch information
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: "branch deploy demo" | ||
|
||
# The workflow to execute on is comments that are newly created | ||
on: | ||
issue_comment: | ||
types: [created] | ||
|
||
# Permissions needed for reacting and adding comments for IssueOps commands | ||
permissions: | ||
pull-requests: write | ||
deployments: write | ||
contents: write | ||
checks: read | ||
|
||
jobs: | ||
demo: | ||
if: ${{ github.event.issue.pull_request }} # only run on pull request comments | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Execute IssueOps branch deployment logic, hooray! | ||
# This will be used to "gate" all future steps below and conditionally trigger steps/deployments | ||
- uses: github/[email protected] | ||
id: branch-deploy | ||
with: | ||
trigger: ".deploy" | ||
|
||
# Run your deployment logic for your project here - examples seen below | ||
|
||
# Checkout your projects repository based on the ref provided by the branch-deploy step | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ steps.branch-deploy.outputs.ref }} | ||
|
||
# Do some fake "noop" deployment logic here | ||
# conditionally run a noop deployment | ||
- name: fake noop deploy | ||
if: ${{ steps.branch-deploy.outputs.continue == 'true' && steps.branch-deploy.outputs.noop == 'true' }} | ||
run: echo "I am doing a fake noop deploy" | ||
|
||
# Do some fake "regular" deployment logic here | ||
# conditionally run a regular deployment | ||
- name: fake regular deploy | ||
if: ${{ steps.branch-deploy.outputs.continue == 'true' && steps.branch-deploy.outputs.noop != 'true' }} | ||
run: echo "I am doing a fake regular deploy" |