Giter Site home page Giter Site logo

alibaba-fc-deploy-action's Introduction

GitHub Actions status License

Alibaba Function Computer Deploy Action For Github Actions

Github action for deploying service/function to alibaba function computer.

Prerequisites

You should be familiar with Alibaba FC and Serverless-Devs FC Component. For more information, see:

Usage

Deploy all the services and functions in your template.yml to FC.

name: deploy to FC

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]
jobs:
  deploy:
    name: deploy service and function
    runs-on: ubuntu-latest
    outputs:
      deploy-logs: ${{ steps.Deploying.outputs.deploy-logs }}
    steps:
    - id: Checkout
      name: Checkout
      uses: actions/checkout@v2

    - id: Initializing-Serverless-Devs
      name: Initializing Serverless-Devs
      uses: Serverless-Devs/serverless-devs-initialization-action@main
      with:
        provider: alibaba
        AccessKeyID: ${{ secrets.ALIYUN_ACCESS_KEY_ID }}
        AccessKeySecret: ${{ secrets.ALIYUN_ACCESS_KEY_SECRET }}
        AccountID: ${{ secrets.ALIYUN_ACCOUNT_ID }}

    - id: Deploying
      name: Deploying
      uses: git-qfzhang/alibaba-fc-deploy-action@main
      with:
        working_directory: ${{ env.WORKING_DIRECTORY }}
        projects: "*"

Deploy the specific function in your template.yml to FC.

name: deploy to FC

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]
jobs:
  deploy:
    name: deploy service and function
    runs-on: ubuntu-latest
    outputs:
      deploy-logs: ${{ steps.Deploying.outputs.deploy-logs }}
    steps:
    - id: Checkout
      name: Checkout
      uses: actions/checkout@v2

    - id: Initializing-Serverless-Devs
      name: Initializing Serverless-Devs
      uses: Serverless-Devs/serverless-devs-initialization-action@main
      with:
        provider: alibaba
        AccessKeyID: ${{ secrets.ALIYUN_ACCESS_KEY_ID }}
        AccessKeySecret: ${{ secrets.ALIYUN_ACCESS_KEY_SECRET }}
        AccountID: ${{ secrets.ALIYUN_ACCOUNT_ID }}

    - id: Deploying
      name: Deploying
      uses: git-qfzhang/alibaba-fc-deploy-action@main
      with:
        working_directory: ${{ env.WORKING_DIRECTORY }}
        projects: myproject
        commands: function

Every single porject contains only one function in the template.yml, more infomation can refer to here.

The application of alibaba-fc-deploy-action can refer to Serverless CI/CD

Input variables

See action.yml for the full documentation for this action's inputs.

  • working_directory - the directory containing template.yml/template.yaml which could refer to here.

  • projects - target projects which are delimited by space. The default * represents all projects.

  • commands - subcommand of the deployment command, contains:

    • service - only deploy service.
    • function - only deploy function.
    • function --config - only deploy function config.
    • function --code - only deploy function code.
    • tags - only deploy service tags.
    • tags -k/--key - only the specified service tag are deploy.
    • domain - only deploy domain.
    • domain -d/--domain - only deploy the specified domain name.
    • trigger - only deploy trigger.
    • trigger -n/--name - only deploy the specified trigger name.
  • args - args of the deployment command, contains:

    • --config - only deploy config.
    • --skip-sync - skip sync auto generated configuration back to template file.

Output variables

See action.yml for the full documentation for this action's outputs.

  • deploy-logs - Stdout/stderr logs of deploying service/function.

License Summary

This code is made available under the MIT license.

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.