Giter Club home page Giter Club logo

create-codeship-build-action's Introduction

Create Codeship Build Action

A GitHub action that creates a build on Codeship via its API.

UNMAINTAINED

Note: This version of the plugin is not maintained anymore.

Why

Codeship allows connecting a VCS repository so that a build is triggered every time something is pushed to that repository.

It might be desirable to trigger a build when changes happen in another repository, e. g. one that is used as a dependency in the repository connected to Codeship.

This action uses the "Create Build" endpoint in Codeship API to trigger a Codeship build.

Usage Example

on: [push]
jobs:
    build:
    ​    runs-on: ubuntu-latest
    ​    if: "contains(github.event.head_commit.message, 'codeship')"
    ​    name: Build on Codeship
    ​    steps:
    ​      - name: Checkout
            uses: actions/checkout@v2
    ​      - name: Call Codeship API
            uses: inpsyde/create-codeship-build-action@v1
            with:
                codeship-user: '[email protected]'
                codeship-pwd: ${{ secrets.CODESHIP_USER_PASS }}
                codeship-orga: 'my-organization'
                codeship-project: 'b419e642-c6e2-11ea-87d0-0242ac130003'
                codeship-project-ref: 'heads/master'

Having a workflow like this in a GitHub repo, will trigger a build on Codeship for every push having the word "codeship" anywhere in the commit message.

Inputs

codeship-user

Codeship user's email. Required.

codeship-pwd

Codeship user's password. Required. Please use secrets in configuration and do not type visibly.

Please note that Codeship API requires a password. Users that access via GitHub/GitLab/Bitbucket, should first obtain a password via the "password recovery" functionality (https://app.codeship.com/password_reset/new).

codeship-orga

Codeship organization name. Required. Note that this is not the "label" but the "slug", which is also used as part of the organization URL. The URL of a repository whose label is "My Awesome Organization" will be something like https://app.codeship.com/my-awesome-organization and my-awesome-organization is what is need to pass as input.

codeship-project

Codeship project UUID. Required. To obtain the UUID it is possible to use Codeship API. Alternatively, the UUID is used as part of the Codeship "Badge" URL, that can be found in the Codeship web app, in the "Project Settings" page, in then the "General" tab.

The badge URL will be something like:

https://app.codeship.com/projects/b419e642-c6e2-11ea-87d0-0242ac130003/status?branch=master

And in that case the project UUID is b419e642-c6e2-11ea-87d0-0242ac130003.

codeship-project-ref

The branch in the repository connected to the Codeship project to trigger the build for. Optional, by default heads/master. It must be in the format of GitHub references, see https://developer.github.com/v3/git/refs/

Note that is possible to use ${{ github.ref }} to dynamically set the value to the branch the workflow is running (see https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#github-context).

License

Copyright (c) 2020 Inpsyde GmbH

This code is licensed under the MIT License.


The team at Inpsyde is engineering the Web since 2006.

create-codeship-build-action's People

Contributors

bueltge avatar gmazzap avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.