Skip to content

Commit

Permalink
Create android-branch-deploy.yml (ref #608)
Browse files Browse the repository at this point in the history
  • Loading branch information
ricky-o-k authored Jul 23, 2023
1 parent 823a85a commit a533b44
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/android-branch-deploy.yml
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"

0 comments on commit a533b44

Please sign in to comment.