Create CODE_OF_CONDUCT.md #100
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Cloudhub Client Generator Pipeline | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push | |
push: | |
branches: | |
- master | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
generate_code: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [14.x] | |
env: | |
CLIENT_GO_REPO: [email protected]:mulesoft-consulting/cloudhub-client-go.git | |
CLIENT_GO_BRANCH: dev | |
GIT_SSH_KEY: ${{ secrets.GIT_SSH_KEY }} | |
steps: | |
- name: Set Up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ env.GIT_SSH_KEY }} | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
- name: Copy Cloudhub-client-generator project | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "pipeline-cloudhub-clients-generator" | |
export GENERATOR_FOLDER=`pwd` | |
export GO_CLIENT_FOLDER=`pwd`/dist/cloudhub-client-generator | |
export ANYPOINT_GENERATOR_GO_DEST="$GO_CLIENT_FOLDER" | |
npm install | |
git clone --branch ${{env.CLIENT_GO_BRANCH}} ${{env.CLIENT_GO_REPO}} $GO_CLIENT_FOLDER | |
npx openapi-generator-cli generate | |
cd $GO_CLIENT_FOLDER | |
git add . | |
git commit -am "Generates modules from pipeline." | |
git push | |