GitHub Actions status License

Alibaba Function Computer Build Action For Github Actions

Github action for building artifacts for compiled language runtime or installing dependencies for interpreted language runtime.

Prerequisites

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

Usage

Currently, Alibaba Fcuntion Computer supports the following programming languages:

Language Type
Nodejs Interpreted
Python Interpreted
PHP Interpreted
Java Compiled
C# Compiled

If you want to build the target projects, you should input these projects seperated by space to projects varibale as follows:

    name: Check

    on:
      push:
        branches: [main]
      pull_request:
        branches: [main]

    jobs:
      build:
        name: Build target projects
        runs-on: ubuntu-latest
        steps:
        - name: Checkout
          uses: actions/checkout@v2

        - 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 }}

        - name: Building
          uses: git-qfzhang/alibaba-fc-build-action@main
          with: 
            working_directory: ./test
            projects: 'ServerlessDevsNode10 ServerlessDevsJava8'

You should ignore projects variable or input * to projects varibale when building all projects:

    name: build fc function

    on:
      push:
        branches: [main]
      pull_request:
        branches: [main]

    jobs:
      build:
        name: Build all projects
        runs-on: ubuntu-latest
        steps:
        - name: Checkout
          uses: actions/checkout@v2

        - 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 }}

        - name: Building
          uses: git-qfzhang/alibaba-fc-build-action@main
          with: 
            working_directory: ./test

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

Serverless-Devs/serverless-devs-initialization-action is the precondition of the building action, more information can refer to here.

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.

License Summary

This code is made available under the MIT license.