Skip to content

Instantly share code, notes, and snippets.

@callmephilip
Created August 18, 2016 18:04
Show Gist options
  • Save callmephilip/27ffd8f0fb4bb5fed04761ba33853ef3 to your computer and use it in GitHub Desktop.
Save callmephilip/27ffd8f0fb4bb5fed04761ba33853ef3 to your computer and use it in GitHub Desktop.
---
format_version: 1.2.0
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
app:
envs:
- opts:
is_expand: false
FASTLANE_WORK_DIR: app
- opts:
is_expand: false
FASTLANE_LANE: beta
- opts:
is_expand: true
GITHUB_USER_NAME: robobaker
- opts:
is_expand: true
GITHUB_USER_EMAIL: [email protected]
trigger_map:
- pattern: "*"
is_pull_request_allowed: true
workflow: primary
workflows:
primary:
steps:
- [email protected]:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- [email protected]:
title: Configure Git user info
inputs:
- content: |-
#!/bin/bash
# fail if any commands fails
set -e
# debug log
set -x
# adding Github to known hosts
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
# config git user info
git config --global user.email $GITHUB_USER_EMAIL
git config --global user.name $GITHUB_USER_NAME
- [email protected]: {}
- [email protected]:
title: To build or not to build
inputs:
- content: |-
#!/bin/bash
# fail if any commands fails
set -e
# debug log
set -x
if [[ "$BITRISE_GIT_MESSAGE" == *"[skip ci]"* ]] ; then
envman add --key PROCEED_WITH_DEPLOYMENT --value 0
else
envman add --key PROCEED_WITH_DEPLOYMENT --value 1
fi
- [email protected]:
run_if: '{{enveq "PROCEED_WITH_DEPLOYMENT" "1"}}'
- [email protected]:
title: Install app dependencies
run_if: '{{enveq "PROCEED_WITH_DEPLOYMENT" "1"}}'
inputs:
- content: |-
#!/bin/bash
# fail if any commands fails
set -e
# debug log
set -x
# install apps deps
cd app && npm install
- [email protected]:
run_if: '{{enveq "PROCEED_WITH_DEPLOYMENT" "1"}}'
inputs:
- lane: "$FASTLANE_LANE"
- work_dir: "$FASTLANE_WORK_DIR"
- [email protected]:
title: Push to git
run_if: '{{enveq "PROCEED_WITH_DEPLOYMENT" "1"}}'
inputs:
- content: |-
#!/bin/bash
# fail if any commands fails
set -e
# debug log
set -x
# push latest to git
git push origin HEAD:$BITRISE_GIT_BRANCH
- [email protected]: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment