~mkelly/build-test

b56e89d91069daff26f1aadb874cd71ff130a100 — Michael Kelly 1 year, 4 months ago 4b14dc3
indent?
1 files changed, 15 insertions(+), 15 deletions(-)

M .build.yml
M .build.yml => .build.yml +15 -15
@@ 7,20 7,20 @@ environment:
  PUSH_BRANCH: main
tasks:
  - check-branch: |
    if [ "x$(git rev-parse origin/${PUSH_BRANCH} --)" != "x$(git rev-parse HEAD --)" ]; then
        complete-build
    fi
      if [ "x$(git rev-parse origin/${PUSH_BRANCH} --)" != "x$(git rev-parse HEAD --)" ]; then
          complete-build
      fi
  - write-ssh-config: |
    cat <<_FILE_ >> ~/.ssh/config
    Host github.com
    IdentityFile ~/.ssh/id_rsa
      IdentitiesOnly yes
      BatchMode yes
      StrictHostKeyChecking no
    _FILE_
      cat <<_FILE_ >> ~/.ssh/config
      Host github.com
      IdentityFile ~/.ssh/id_rsa
        IdentitiesOnly yes
        BatchMode yes
        StrictHostKeyChecking no
      _FILE_
  - push-to-github: |
    cd ~/"${REPO}"
    # remove remotes/origin/HEAD so we don't push it
    git remote set-head origin -d 
    git remote add github "git@github.com:${GH_USER}/${REPO}.git"
    git push --prune github '+refs/remotes/origin/*:refs/heads/*' '+refs/tags/*:refs/tags/*'
      cd ~/"${REPO}"
      # remove remotes/origin/HEAD so we don't push it
      git remote set-head origin -d 
      git remote add github "git@github.com:${GH_USER}/${REPO}.git"
      git push --prune github '+refs/remotes/origin/*:refs/heads/*' '+refs/tags/*:refs/tags/*'